-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix customer_details Backbone always setting Guest checkout True #2145
Conversation
When the page is rendered the value of #user_id is set and the Backbone render was resetting that. This changes the render to fallback to that value if the model doesn't have the user_id already present.
Is it possible to get a regression spec for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we fix the model instead? It should have an user_id
if the order is not an guest order.
The model does have the |
Can we fix this then instead? |
That's what this does. It either uses the data that has been set in Backbone through another method or gets the value from the rendered page while initializing. It could be done a different way. Probably in the initializer. |
We can make @swcraig write a regression feature spec for this. |
I am working on the regression spec. |
Closing in favor of #2176 which includes the regression |
Thanks! |
When the page is rendered the value of #user_id is set and the Backbone
render was resetting that. This changes the render to fallback to that
value if the model doesn't have the user_id already present.
Steps to Recreate:
Create order in Admin
Get to address step
Use Customer Search to add a User to the order
Notice Guest Checkout is now No
Complete Address Step
Go back to Address Step
Guest Checkout is now Yes even though a user is attached to order