cart.total_price doesnt refresh

Topic summary

A user is experiencing an issue where {{ cart.total_price | money_with_currency }} in the cart/cart drawer doesn’t automatically update when products are added or removed. The price only refreshes when the entire page is reloaded or another product’s quantity is changed.

Proposed Solution:

  • Locate the theme’s JavaScript function that refreshes cart totals when the default add-to-cart button is clicked
  • Hook this same function to trigger when upsell products are added to the cart
  • Alternatively, use Shopify’s Ajax API (https://shopify.dev/docs/api/ajax/reference/cart) to rewrite the cart total via a custom Ajax call when bundle products are added

The issue appears related to cart drawer functionality not being properly triggered by certain product additions, requiring manual JavaScript integration to sync the displayed total with actual cart state.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

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