-
Notifications
You must be signed in to change notification settings - Fork 267
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
Cart Id / Cookie is not reset on checkout completed #2524
Comments
We're looking into this |
@gmilon If you have cart id examples that is showing this behaviour, please share here. It would help us greatly on investigation |
I am seeing this as well with a b2b setup. Using unstableB2b: true in app load context. I can't seem to get the cart back to a good place after checkout. |
@sbaleno If you have cart ids that is showing this behaviour, please share |
@gmilon @sbaleno - If you have order id that show this behaviour, that works too. But this does mean you need to share the store url as well. You can DM on twitter @wizardlyhel if sharing the url here isn't an option or DM me in the Shopify partner slack channel if you already have access. |
Hey @wizardlyhel, I'm encountering a similar issue while trying out Hydrogen. In the Dawn standard store setup the cart cookie is automatically removed after checkout. However this isn't happening for my custom Hydrogen storefront both on the deployed and localhost version. The same cart cookie is still present (with the same value) and causing issues. The issues get resolved after I manually remove the cart cookie. I've also noticed that the cart from useOptimisticCart appears to be "reset" at the storefront after checkout (new ids, no buyeridentity) but the same cookie value for the cart remains. This makes it hard for me to identify if the current cart cookie should be removed (which would fix it for now I guess). Best, (using hydrogen version 2024.7.9) |
@mhxim It's expected that after checkout, if the buyer returns to the site, the cart cookie remains with the old cart cookie. This is because that the next cart mutation should give you a new cart id. It's why in |
We are facing the same issue with 2 different scenarios:
Using |
@wizardlyhel thanks for the help. For me an issue occurs after the cart mutation when I try to add new items to the cart.
So I can't add new items to the cart after the mutation. 🤔 I don't know what's causing this issue. It works as expected with the default cart (I can add the item multiple times). In my store the item doesn't have a limited quantity. Best, |
What is the location of your example repository?
No response
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
2024.7.4
What version of Remix are you using?
2.10.1
Steps to Reproduce
Note: This happens to some users after placing multiple orders.
Anyone knows how hydrogen handle the cart reset event post checkout ?
Maybe we missed something in the flow.
is there any cart property we can check on storefront to reset the cart manually?
We cannot find anything related to the checkout / order in the Cart object definition.
Expected Behavior
Cart is empty and user can add new product and place a new order.
Actual Behavior
Cart still have the previous items and the checkout link redirect the user to the order thank you page.
The text was updated successfully, but these errors were encountered: