Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to hide the icon to delete the product in the cart but what I have tried does not work for me, c'aul could it work and what will be the problem of my code? please.
{% if product.id == 8197916033311 %}
{% render 'icon-remove' %}
{% endif %}
or
{% if item.id == 8197916033311 %}
{% render 'icon-remove' %}
{% endif %}
or
{% for item in cart.items %}
{% if item.tags contains "tag" %}
{% render 'icon-remove' %}
{% endif %}
{% endfor %}
Thank you.
Hi @ColombiaDev
Depending on which theme you are using. I see your are trying to add a condition for the icon remove to hide/show.
You need to find your cart items code in your theme. Then find the icon remove. The code below should work
{% for item in cart.items %}
{% if item.id == 8197916033311 %}
{% render 'icon-remove' %}
{% endif %}
{% endfor %}
It doesn't work, what could it be?
Oh. You need to add this to your cart code, you might need someone to do this for you if you are unable to locate the code
Ok, I am still looking for the solution. Thank you.
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025