All things Shopify and commerce
How can I automatically update {{ cart.total_price | money_with_currency }} in the cart / cart drawer whenever any product is added or removed?
Currently, if I add or remove a cart upsell product the {{ cart.total_price | money_with_currency }} doesn't refresh unless the page is entirely reloaded or another product's quantity changes.
Hello @Anthony808 ,
Find and check the theme JS function which refresh the cart total on click of default atc button.
Hook the same function when your upsell product added the cart.
Or using own ajax call, rewrite the cart total when bundle product added to cart.
https://shopify.dev/docs/api/ajax/reference/cart
Regards
Guleria
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025