All things Shopify and commerce
Hi, last year I ask for help from a developer in the Shopify Community to hide 'add to cart' button from my homepage. Then, now I want to make it appear again but I forgot where to find the code section and which code that the developer put it. I hope someone can help me or guide me to solve the issue. I'm using 'crave' theme.
Thank you very much.
This is the website - sugarstar.com.my
Hi @sugarstarhq. You can try the following code in your header.liquid file. As we don't have access to the code of your header.liquid file, we can't check it. For your information, the following code is taken from Crave theme.
{%- if shop.customer_accounts_enabled -%}
<a href="{{ routes.cart_url }}" class="header__icon header__icon--cart link focus-inset" id="cart-icon-bubble">
{%- liquid
if cart == empty
render 'icon-cart-empty'
else
render 'icon-cart'
endif
-%}
<span class="visually-hidden">{{ 'templates.cart.cart' | t }}</span>
{%- if cart != empty -%}
<div class="cart-count-bubble">
{%- if cart.item_count < 100 -%}
<span aria-hidden="true">{{ cart.item_count }}</span>
{%- endif -%}
<span class="visually-hidden">{{ 'sections.header.cart_count' | t: count: cart.item_count }}</span>
</div>
{%- endif -%}
</a>
{% endif %}
Feel free to ask any question if you have any.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025