How can I add a number inside my cart bag on my website?

Luxurymrkt
Navigator
597 2 104

Hi I’m looking to add a number inside my cart. 

9D619A6E-DC42-42E0-A535-9C6152260BFF.png


my site is https://luxurymrkt.com

Thank You | mike
Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
7951 1547 1575

Hi @Luxurymrkt 

You can go to your Online store > Themes > Edit code > open header.liquid file, find this "<span class="cart-link">", then add this code below that part 

{% for item in cart.items %}
  {{ cart.items_count }}
{% endfor %}

 

 

- Helpful? Like and Accept solution to let me know or Donate
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

Luxurymrkt
Navigator
597 2 104

I don't have the  <span class="cart-link"> in my header. is there another file to check

Thank You | mike

VIEKIN
Shopify Partner
662 79 94

Hi,

To show the number of items inside cart, you can find to place where is handling code showing the icon cart and add more code like this

{% if cart.empty == false %}
{{ cart.item_count }}
{% else %}
0
{% endif %}

 

You can please Like and Accepted Solution if my suggestion helpful. And if you want to customize or develop new feature on Theme or App => Contact to us via Email or Skype.
- Contact Support : Gmail | Skype: live:.cid.309f2fbaceec513