Cart Icon Counter Not Updating Automatically

I am on Dawn 15.0. When I add items to my cart, the issue is that the cart count displayed in the bubble does not update in real-time. To see the updated count, I currently have to manually refresh the page.

URL: artey.com.au

Hi there, @Artey .

Thanks for sharing your question to the Shopify Community.

When navigating to your website, I’m able to replicate the same issue. I started by adding an item to the cart, and it did not update until I navigated to another page to explore.

To gather a bit more context, could you provide information on the following:

  • Have you recently installed any new apps?
  • Have you added any coding to your theme?
  • Does this issue happen when using a fresh Shopify theme?

I added Afterpay and Smart Wishlist but this has been observed even before the new apps were installed.

I haven’t added custom coding related to the cart button. Here’s the code related to cart-icon-bubble in header.liquid file, in case this helps.

{%- liquid if cart == empty render 'icon-cart-empty' else render 'icon-cart' endif -%} {{ 'templates.cart.cart' | t }} {%- if cart != empty -%}
{%- if cart.item_count < 100 -%} {{ cart.item_count }} {%- endif -%} {{ 'sections.header.cart_count' | t: count: cart.item_count }}
{%- endif -%}

Thanks for your reply.

Could you try installing a fresh Shopify theme to see if the issue persists? Another option is rolling back your theme code (without publishing) to see when the issue took place.

Since adding to cart is handled by the “Best custom product options” app, you should consult whether the app can update the cart bubble as well.

You can actually modify this code for the app I mentioned below to update the bubble.

Need to assign classes for the app to recognize it.

Replace:

{%- if cart != empty -%}

{%- if cart.item_count < 100 -%}
{{ cart.item_count }}
{%- endif -%}
{{ 'sections.header.cart_count' | t: count: cart.item_count }}

{%- endif -%}

with:


 {{ cart.item_count }}