Solved

How to add item count number to cart icon in Brooklyn theme

lovechidozie
Excursionist
18 5 3

I'm having trouble figuring out how to add the an item count number to my store's cart icon on Brooklyn theme. Please assist me in solving this problem.

Accepted Solutions (2)

dmwwebartisan
Shopify Partner
12282 2546 3694

This is an accepted solution.

Hello  @lovechidozie,

Sorry for the above message I got some trick for this. So others can also take benefits to Add item count on the cart icon in the Brooklyn theme.

Here is the solution. 🙂


please find code Sections/header.liquid

<span class="cart-link__bubble{% if cart.item_count > 0 %} cart-link__bubble--visible{% endif %}"></span>

Replace this new code 

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

add code assets/theme.scss.liquid or timber.scss.liquid bottom of the file

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

I hope this will work for you.


Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app

View solution in original post

dmwwebartisan
Shopify Partner
12282 2546 3694

This is an accepted solution.

HI @lovechidozie 

please change following css class in timber.scss.liquid

.icon-cart:before {content: '\e600';}

add new code in content: 'new code here'

thanks!

 
If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app

View solution in original post

Replies 24 (24)