I'm having a problem with the snipcart shopping cart. I'm using the Grav CMS. Everything works fine until you go a page back with the browser back button. If you've added anything to your cart and after that you go some pages back, the cart doesn't show anything until you reload the page.
This is how I add to the cart, which works perfectly fine for me
<button class="snipcart-add-item" id="add-product" data-item-id="{{ page.header.product.id }}" data-item-price={{ page.header.product.prijs }} data-item-url="{{ page.header.product.url }}" data-item-description="{{ page.header.product.omschrijving }}" data-item-image="{{ page.media.images|first.url }}" data-item-name="{{ page.header.product.naam }}" data-item-quantity="1">
Add to cart
</button>
Likewise, when you add something to your cart, delete it and go back with the back button, a couple times, the item is added to your cart again until you refresh the page. Anyone got an idea how to fix this?
Thanks for helping!