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
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024