What's your biggest current challenge? Have your say in Community Polls along the right column.

Dawn 11 bug - Cart icon shows incorrect number of items in cart, when using browser's back button

Dawn 11 bug - Cart icon shows incorrect number of items in cart, when using browser's back button

herastore
Excursionist
25 1 6

I'm on Dawn 11.0

 

This is easy to reproduce, imagine you have an empty bag, if you add an item to the bag, you see the bag icon in the header increase its number to 1.

If you hit the Back button on the browser (mobile or desktop, does not matter), it will take you to the page you were in before, as usual, but if you look at the number in the cart icon, it will be empty (previous bag number). But it should be 1. It seems to load the cached page, but not update that number in the cart icon.

 

I saw some github issues open about this on Dawn 6 and 7. We are in Dawn 11 and this is still hapenning? Does someone now about this?

 

Thanks!

Replies 2 (2)

Huptech-Web
Shopify Partner
1011 204 218

Hello @herastore ,

 

Please check the "header.liquid" file in the section. Check the part of the code and make sure {{ cart.item_count }} is there. If the error is still there please share your store URL!

 

image.png

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
herastore
Excursionist
25 1 6

Hi @Huptech-Web 

 

Yes, the code is there. My store is password protected, and it's in final stage of testing, I can't share it right now.

 

But that's not the problem. I'm not saying the number does not show up, I'm saying the number shows up, but it's the wrong number (when you press Back in the browser)