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 -%}
{%- liquid
if cart == empty
render 'icon-cart-empty'
else
render 'icon-cart'
endif
-%}
{{ 'templates.cart.cart' | t }}
{%- if cart != empty -%}
{%- if cart.item_count < 100 -%}
{{ cart.item_count }}
{%- endif -%}
{{ 'sections.header.cart_count' | t: count: cart.item_count }}
{%- endif -%}
{% endif %}
Feel free to ask any question if you have any.