Top

Cart Count is Showing More than is in the Cart

If the cart count is showing more than is in the cart, follow these steps to fix the issue:

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Select Actions 

  3. Select Edit code.

    Select Edit code 

  4. Under "Layout", select theme.liquid.

    select theme.liquid 

  5. Find:
    {{ cart.item_count }}

    Note: If you can't find this in theme.liquid, look in cart.liquid under "Templates" or cart-template.liquid under "Sections".

    find the code 

  6. Replace it with:

    {% assign count = 0 %}
    {% for item in cart.items %}
    {%if item.variant.metafields.bold_measurement.formula %}
    {% capture temp %}
    {{ count | plus: 1 }}
    {% endcapture %}
    {% assign count = temp %}
    {% else %}
    {% capture temp %}
    {{ count | plus: item.quantity }}
    {% endcapture %}
    {% assign count = temp %}
    {% endif %}
    {% endfor %}
    {{ count }}

    replace the code 

  7. Select Save.

    select save 

That's it!