Why is the item count not displaying in my shopping cart?

Why is the item count not displaying in my shopping cart?

Queenofgifts
Excursionist
15 0 4

Dear technical gurus, 

 

Could you advise on the solution to fix the item count in the shopping cart? 

 

I have items in the cart, but there is no number count displayed.

 

Any suggestion of why that is / how to fix this? 

Screenshot 2021-11-18 at 10.18.50.png

 My store: https://box-and-bow-nl.myshopify.com

    Password: diekla

 

Thank you very very much!

Asta 

 

Replies 4 (4)

DP_Development
Shopify Partner
120 14 30

Hi there!

 

So as the bubble already appears, when there is a product in your cart, you just need to add a line of code to display the amount of products in your cart. This line should do the trick in your header file. Put it in the if block of the cart bubble

{{ cart.item_count }}
Software Engineer and Frontend Developer
Fast, cheap and straightforward solutions! Shall I do this for you? Just send me a message!
Please click on like and "accepted solution" if my answer helped you.
JesusFarias
Visitor
1 0 1

How much do you charge for a fix like that??

Aditya10
Excursionist
11 1 1

I can fix this issue for you can reach me at contactaditya98@gmail.com

JoJoH
Visitor
1 0 0

Hi there, 

I currently have the same issue,  ive checked the code and it all looks correct..so i dont quite know why its doing this?  Is there anything you can suggest?  it wont let me upload a screen shot so here is the coding;

 

{% comment %}
JS-load cart markup without bloat of a full layout.

This is used in both the mini cart drawer and cart page.
When a quantity is changed, this file is scraped and data-products
is fully replaced to account for possible cart discounts changing

The cart-wide discount div also replaces what is originally in the cart
as it can change anytime a cart-item changes
{% endcomment %}
{% layout none %}

<div class="cart__items"
data-count="{{ cart.item_count }}"
{% if cart.total_discounts > 0 %}
data-cart-savings="{{ cart.total_discounts }}"
{% endif %}
data-cart-subtotal="{{ cart.total_price }}">
{% for item in cart.items %}
{%- render 'cart-item', product: item -%}
{% endfor %}
</div>
<div class="cart__discounts{% if cart.cart_level_discount_applications == blank %} hide{% endif %}">
<div class="cart__item-sub cart__item-row">
<div>{{ 'cart.general.discounts' | t }}</div>
<div class="text-right">
{% for cart_discount in cart.cart_level_discount_applications %}
<div>
{{ cart_discount.title }} (-{{ cart_discount.total_allocated_amount | money }})
</div>
{% endfor %}
</div>
</div>
</div>

 

Many thanks in advance!

 

Jo