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.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024