Shopify themes, liquid, logos, and UX
I want to remote the "Cart" in the header of my store. I am using the Minimal them - fashion.
Can someone please help?
Solved! Go to the solution
This is an accepted solution.
The following tutorial assumes your're using Minimal 12.6.1 or that the relevant code in the version of your theme you're using is the same or at least similar. Please be sure to make a backup of your theme before you make any changes to the code!
Go to the theme code editor (Online Store -> Themes -> Actions -> Edit code) and open the file sections/header.liquid. Around line 112 you will find the following code:
<div class="header-bar__module">
<a href="{{ routes.cart_url }}" class="cart-page-link">
{{ 'layout.cart.title' | t }}{% unless cart.item_count == 0 %}:{% endunless %}
<span class="cart-count header-bar__cart-count{% if cart.item_count == 0 %} hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
</div>
Comment out the line that begins with {{ 'layout.cart.title' | t }} so the code looks like this:
<div class="header-bar__module">
<a href="{{ routes.cart_url }}" class="cart-page-link">
{% comment %}{{ 'layout.cart.title' | t }}{% unless cart.item_count == 0 %}:{% endunless %}{% endcomment %}
<span class="cart-count header-bar__cart-count{% if cart.item_count == 0 %} hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
</div>
That will remove the word "Cart" from the cart icon but leave the cart item counter in place.
This is an accepted solution.
The following tutorial assumes your're using Minimal 12.6.1 or that the relevant code in the version of your theme you're using is the same or at least similar. Please be sure to make a backup of your theme before you make any changes to the code!
Go to the theme code editor (Online Store -> Themes -> Actions -> Edit code) and open the file sections/header.liquid. Around line 112 you will find the following code:
<div class="header-bar__module">
<a href="{{ routes.cart_url }}" class="cart-page-link">
{{ 'layout.cart.title' | t }}{% unless cart.item_count == 0 %}:{% endunless %}
<span class="cart-count header-bar__cart-count{% if cart.item_count == 0 %} hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
</div>
Comment out the line that begins with {{ 'layout.cart.title' | t }} so the code looks like this:
<div class="header-bar__module">
<a href="{{ routes.cart_url }}" class="cart-page-link">
{% comment %}{{ 'layout.cart.title' | t }}{% unless cart.item_count == 0 %}:{% endunless %}{% endcomment %}
<span class="cart-count header-bar__cart-count{% if cart.item_count == 0 %} hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
</div>
That will remove the word "Cart" from the cart icon but leave the cart item counter in place.
Hi Thomas,
Thank you so much for the quick help.
It worked! 🙂
There is another modification I would like to make, can you please guide me?
Regards,
Team BSPL.
Sure, just post it here and I'll see if I can help.
I need to replace the "Log in or Create Account" text with an account icon.
The theme is the same - Minimal.
Regards,
Team BSPL.
That's a little bit more complex, I would recommend hiring an Expert or getting a quote from https://heycarson.com/.
Thanks, I will look into it.
Regards,
Team BSPL
User | RANK |
---|---|
120 | |
96 | |
77 | |
69 | |
38 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022