Hello I am developing a custom page that has a list of product with a add to cart button, this add to cart button call the cart/add API and successfully add the items, however the change in the cart isnt done until refresh. Is there a function to call to refresh the cart. this is a custom page so i cant use liquid
Topic summary
A developer is building a custom page with product listings and add-to-cart buttons. The cart/add API successfully adds items, but the cart doesn’t update until the page is manually refreshed.
Key Issue:
- Changes to the cart aren’t reflected immediately after adding items
- The page is custom-built without Liquid templating access
Question:
The developer is seeking a function or method to programmatically refresh the cart display without requiring a full page reload, given the constraint of working outside Liquid’s templating system.