-
Notifications
You must be signed in to change notification settings - Fork 494
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 for #6578 Breaks Carts for New Customers (Reopen #290) #306
Comments
Same issue. It's really annoying when we login during the checkout process |
Same for me |
This is a major regression that's just bitten us :( |
@JoeStanton I know your pain guys - adding to our priorities list to sort this thing out |
@damianlegawiec see wuboy0307@76e890f for a possible fix. |
Even better: use the logic of |
@mvz looks good, can you submit a PR? |
@damianlegawiec sure. |
@damianlegawiec done. Looks like CircleCI is having trouble building anything, but Travis seems happy 😄. |
@mvz yeah, Circle recently has some serious problems :/ Thank you! |
Previous issue: #290
The concerned issue is closed and I'm not sure if anyone is watching so I'm opening a new one to be sure :
Problem :
Cart are not merged if when a user logs in. Previous guest_cart is not merged with the signed_in cart and the the guest_cart is in limbo since it was not merged and the guest_token is destroyed on log out so you can't access it again
Steps :
Expected results :
Cart contain Item #1 and Item #2 since the carts should be merged
Results :
Guest cart is discarded so you only have Item #2 in your cart
Gemfile
https://gist.github.com/dangerdogz/5563861ca6a1d4d0649f
Gemfile.lock
https://gist.github.com/dangerdogz/bf19cf07bf569360afd8
Regression introduced in commit 336b0e4
Suggested solution :
The offending commit intend to fix the following problem :
The guest user ends up in the user account because since guest_token is cleared on logout, it's not resetted after the guest checkout and the logged in user reuse the same token thus associating both order to the user
In my opinion, it's somewhat an edge case since you have to do the steps on the same computer in the correct order and the fix ends breaking an essential checkout flow (shop, log in, countinue)
Thus, I suggest that we revert the offending commit and fix the original problem in one of the following ways :
I'll make the pull request once a solution is selected, feel free to chime in if you have a better way to fix it, I'm not that much familiar with this part of Spree
The text was updated successfully, but these errors were encountered: