Skip to content
Advertisement

Refresh part of page when user navigated back to it

In my shop page, for each product I have cart quantities that the user can change without add to cart button (it’s with display none and activated by js). my problem is that if a user changed item quantity in single product page and navigated back into shop page it show the wrong quantity from cache. Right now i’m reloadin the whole page using this code:

JavaScript

I want to refresh just the quantities and not the whole page:

JavaScript

And what i tried to do is this:

JavaScript

But it gets the cached version of the cart and not the updated one.

Advertisement

Answer

SOLVED! used interval to check when fragments are updated

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement