Shopify Cart icon showing incorrect number of items in car

Shopify Cart icon showing incorrect number of items in car

NihitP
Tourist
14 0 3

When I add to cart the icon duplicates the amount so say if I add one it shows as 11 instead of 1, and if its 2, 22 and etc 

 

IMG_5301.jpeg

IMG_5300.jpeg

Replies 8 (8)

suyash1
Shopify Partner
10691 1316 1696

@NihitP Can you please share this page link?

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
NihitP
Tourist
14 0 3

Innovule.com

suyash1
Shopify Partner
10691 1316 1696

@NihitP - one of the default class name for css is not appearing and hence it is giving this error, have you edited the code?

 
 
Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
NihitP
Tourist
14 0 3

Yes, I made a change to make the sale icon into percent off

suyash1
Shopify Partner
10691 1316 1696

@NihitP you will again need to edit code for cart-bubble and add class - visually-hidden to the second span which would be in code like - <span class="">

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
NihitP
Tourist
14 0 3

it already has it, I havent messed with that, here is how the code looks: 

{% if cart == empty %}
<span class="svg-wrapper">{{ 'icon-cart-empty.svg' | inline_asset_content }}</span>
{% else %}
<span class="svg-wrapper">{{ 'icon-cart.svg' | inline_asset_content }}</span>
{% endif %}

<span class="visually-hidden">{{ 'templates.cart.cart' | t }}</span>
{%- if cart != empty -%}
<div class="cart-count-bubble">
{%- if cart.item_count < 100 -%}
<span aria-hidden="true">{{ cart.item_count }}</span>
{%- endif -%}
<span class="visually-hidden">{{ 'sections.header.cart_count' | t: count: cart.item_count }}</span>
</div>
{%- endif -%}

NihitP
Tourist
14 0 3

Looks the the cart app i am using is causing this issue

suyash1
Shopify Partner
10691 1316 1696

@NihitP - you can contact app support team, or edit code and put custom class to hide one of the price and it should work

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.