Shopify themes, liquid, logos, and UX
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.
Solved! Go to the solution
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!
This is an accepted solution.
please change following css class in timber.scss.liquid
.icon-cart:before {content: '\e600';}
add new code in content: 'new code here'
thanks!
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024