0
votes

My shopify store have a problem in checkout. When user login on checkout page and after login redirect back to checkout page sample product are disappear from order summary (cart).

This should be session issue or another issue ?

More Description

In our site we are giving one sample product free for 1 product purchase. For this we make one collection for sample product and set price 0 and show them at cart page. after user add one product to cart and proceed for checkout they have a option for choose available sample product for free , after selection of sample product next step is checkout page. at checkout page both product and sample product are there in order summary. now user have a two option either they can proceed order as a guest user or they can login and place a order. and issue occurred when user select login option and after succesfully login user redirect to checkout page but then sample product disapeered from order summary , product that user purchased are there in order summary but sample product are disappear. we didn't use any app for this. doing this by code. due to we don't have a access of checkout. Any help will be appreciated.

1
Hmm. Customers should still have the contents of their cart after logging in. Out of curiousity, in your domain settings, do you have your store set up to automatically transfer people to your primary domain? If not, it could be that you've gone from mystore.com to mystore.myshopify.com (or vice versa), thereby losing the cart cookie because you're now at a completely different siteDave B
Do you have any validation code to remove the sample products from the cart? It could be that it's firing when it's not supposed to.Dave B

1 Answers

0
votes

If you fill a cart and go to checkout as an anonymous customer, and then choose to login, you are correct. Your anonymous cart is lost since you are now logged in, known as a customer and hence you have a clean slate.

You can set your shop to not allow anonymous (guest) checkouts, or else, just go with it. This is not a bug you are seeing. It totally makes sense.