Solved

Venture Theme: Add item count to header cart icon

premija
Excursionist
26 2 10

Hi,

I am using the venture theme and would like to add item count to the header cart icon in my store. I have searched but have not found a solution to this problem. I would like to have the item count update as items are added without having to refresh the page.

Accepted Solution (1)

premija
Excursionist
26 2 10

This is an accepted solution.

Here is the solution. 🙂

 

Please find this code in Sections/header.liquid

 

<span class="site-header__cart-indicator {% if cart.item_count == 0 %}hide{% endif %}"></span>

 

Replace it with this new code 

 

<span class="site-header__cart-indicator {% if cart.item_count > -1 %} site-header__cart-indicator--visible{% endif %}">{{ cart.item_count }}</span>

 

Add this code to assets/theme.scss.liquid bottom of the file

 

.site-header__cart-indicator--visible {
  	top: 9px !important;
    width: 15px !important;
    height: 15px !important;
    color: #fff;
    font-size: 15px;
    text-align: center;
}

 

End results

Screenshot (657).png   Screenshot (656).png

 

I hope this works for anyone else that's using the Venture theme and is trying to add item count to their cart icon.

View solution in original post

Replies 10 (10)

KetanKumar
Shopify Partner
36843 3636 11978

@premija 

Welcome to the Shopify community!
and Thanks for your question.

Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
premija
Excursionist
26 2 10

@KetanKumar 

Thank you for your welcome and below is the website URL and password.

Store link -  https://premija-llc.myshopify.com/

Password - phiame

KetanKumar
Shopify Partner
36843 3636 11978

@premija 

do you need a product page or product listing?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
premija
Excursionist
26 2 10

@KetanKumar 

I have 5 test products listed. When I add items to my cart, it is shown as seen in the photo below.

Screenshot (365).png

KetanKumar
Shopify Partner
36843 3636 11978

@premija 

It can be done by doing some code customization. please send me a personal message and we can discuss what you'd like

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
premija
Excursionist
26 2 10

@KetanKumar 

I have sent you a personal message as requested.

KetanKumar
Shopify Partner
36843 3636 11978

@premija 

Great, Thanks i will check and let you know

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

premija
Excursionist
26 2 10

This is an accepted solution.

Here is the solution. 🙂

 

Please find this code in Sections/header.liquid

 

<span class="site-header__cart-indicator {% if cart.item_count == 0 %}hide{% endif %}"></span>

 

Replace it with this new code 

 

<span class="site-header__cart-indicator {% if cart.item_count > -1 %} site-header__cart-indicator--visible{% endif %}">{{ cart.item_count }}</span>

 

Add this code to assets/theme.scss.liquid bottom of the file

 

.site-header__cart-indicator--visible {
  	top: 9px !important;
    width: 15px !important;
    height: 15px !important;
    color: #fff;
    font-size: 15px;
    text-align: center;
}

 

End results

Screenshot (657).png   Screenshot (656).png

 

I hope this works for anyone else that's using the Venture theme and is trying to add item count to their cart icon.

KetanKumar
Shopify Partner
36843 3636 11978

@premija 

thanks for update

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Choice_Water_
Visitor
1 0 0

Premija, that worked great. Thank you for that.

 

1 small thing however; 

number of item wont show up in cart unless you refresh screen.

Can coding be adjusted so that when you add an item to cart, it indicates so without refreshing screen?

 

using Venture