Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi Shopify Community,
I’m currently implementing a dynamic cart update using the Shopify Ajax API and am encountering an issue where the cart items, the cart icon bubble, don’t visually update without a page reload after a successful POST request.
Here is the code I’m using to update the cart:
await postToCart('cart/add.js', { items: [{ quantity: 1, id: VARIANT_ID, properties: { _custom: true, price } }], sections: "cart-items,cart-icon-bubble,main-cart-items,cart-footer", sections_url: "/cart" });
I’m referencing the Bundled Section Rendering documentation to update the cart sections dynamically, but it’s not triggering a re-render without a page refresh.
Could you provide guidance on how to properly trigger the dynamic updates for these sections, so the cart visually reflects the changes?
Solved! Go to the solution
This is an accepted solution.
This is an accepted solution.
UPDATE --> SOLUTION SOLVED.
comment here if anyone needs
I am also encountering issues with the section rendering API. How did you solve this?
I have a scenario where it work on the live version but not on the local development...
But it's using the formData object. I have no clue why this is happening
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025