Hello, I am trying to replace the current cart icon in the header section with an image I uploaded to my shopify store named cartImg.png. I am pretty sure that the changes need to be made in the sections > header.liquid , but I can't seem to find the exact location. If you could please help me out that would be great! Thanks in advance!
I believe the changes need to be made in this section of the code, but I am not entirely sure. I appreciate any help, tips, or tricks!
<a href="{{ routes.cart_url }}" class="header-cart-btn cart-toggle">
<span class="icon icon-cart"></span>
{{ 'layout.cart.cart' | t }} <span class="cart-count cart-badge--desktop {% if cart.item_count == 0 %}hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
Solved! Go to the solution
This is an accepted solution.
Welcome to the Shopify community!
and Thanks for your Good question.
1. Go to Online Store->Theme->Edit code
2. Asset->/ upload your cart image same name as per code
<a href="{{ routes.cart_url }}" class="header-cart-btn cart-toggle">
<img src="{{ 'cartImg.png' | asset_url }}" alt="{{ shop.name }}" itemprop="logo">
{{ 'layout.cart.cart' | t }} <span class="cart-count cart-badge--desktop {% if cart.item_count == 0 %}hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
Thanks so much! I appreciate the help and your quick reply. I should be able to apply this same concept for other icons as well, so this was super helpful!
This is an accepted solution.
Thanks for update and support.
thanks it works but how to change the size of icon image ? wich size the best voor cart icon??
Sorry for facing this issue, it's my pleasure to help us.
Welcome to the Shopify community!
and Thanks for your Good question.
Please share your site URL,
So I will check and provide a solution here.
here is url
i want to change i con with awsomfont
<i class="fas fa-shopping-basket"></i>
yes, please add this and let me know
whenever do you have display?
User | Count |
---|---|
498 | |
210 | |
131 | |
80 | |
43 |