Cart is empty after returning from checkout with back button

Shopify Partner
78 0 18

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.

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes
Shopify Staff
Shopify Staff
1118 78 156

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. 

0 Likes
Shopify Partner
78 0 18

Created a support ticket via the partner portal.

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes
Shopify Staff
Shopify Staff
1118 78 156

Thanks Bart, got it - I'll get this to the right people today so they can investigate further and let you know their findings.

0 Likes
Shopify Partner
78 0 18

@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?

 

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes
Shopify Staff
Shopify Staff
1118 78 156

Hey @DiscountNinja , 

 

Consider it relayed! Thanks for following up. 

0 Likes
Highlighted
New Member
1 0 0

Does anyone have an update on this issue? We have Retina theme and have been experiencing this issue for quite some time. I'm anxious to have it resolved before the holiday shopping season. I've reached out to Retina to no avail so far. Any other advice? 

0 Likes