-
Hi, I've gotten everything working smoothly where a logged in user will create a new cart when adding an item to their cart, and I noticed that if I pass the session token for the authenticated account to the addCartItem graphql mutation it also assigns that cart to the logged in user which is very nice. I can they just use the cart token to continue the session. I'm just wondering how I could do this in reverse where a guest has a cart and when they log in / create an account I can assign that cart to their account. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I solved this, in short, always reset the session token with the latest one given. I thought that would lose the cart and have a new one created but it just works! |
Beta Was this translation helpful? Give feedback.
I solved this, in short, always reset the session token with the latest one given. I thought that would lose the cart and have a new one created but it just works!