While testing Shopify's checkout process on development stores we routinely run into a situation where the cart suddenly becomes empty.
More often than not this happens when navigating from the checkout to the cart using the back button.
Using the back button to go to the cart instead of using the "return to cart" links may be part of what causes this behavior. In the video link you find below you'll see that I reproduced this issue on a brand new development store without any apps installed. Other factors that may contribute: we typically have the admin of the shop open, we also typically have multiple tabs open with the product page/cart or checkout of one or more development stores.
Does anybody at Shopify have an idea what could be causing this and if this could indeed affect shop visitors?
Here's a video that shows how the issue reproduced on my machine: https://www.loom.com/share/69eb9e55646a4056b5992bf606f03e0a
This issue is important to us since our app uses DraftOrders to create a checkout. That checkout unfortunately does not contain a "return to cart" button, so visitors have to use the back button if they want to go back to the cart. That means the risk that visitors run into this "empty cart" issue is real.
Hey @DiscountNinja ,
Wow - that is interesting. It took me about ~25 tries or so, but I was finally able to replicate it once. Would you be able to create a ticket from your Partner Dashboard about this? I think you may have done this before, but just for reference in case - if you click 'Support' in the sidebar in your Partner Dashboard and then click the 'Email support' option, as long as you use the 'App development' topic it should create a ticket that I can grab and I'll get our core technical team looking into this.
I would suggest referencing me by name within your message so we can make sure this ends up in the right hands.
@Josh I found others reporting the same issue with the cart disappearing
This article, while posted on a CartJs forum, actually concludes the behavior is likely caused by Shopify's caching implementation: https://github.com/discolabs/cartjs/issues/158
They suggest this could be a CloudFlare / page caching issue whereby the cart json is actually cached in the page, causing issues.
This issue, in combination with the fact that the Checkout API does not allow for displaying a "return to cart" link on a custom checkout, is quite worrying.
Can you relay this information to the relevant team please?
|2 hours ago|
|2 hours ago|
|3 hours ago|
|4 hours ago|
|5 hours ago|