Follow

Edit the collection.liquid to hide Gifts product

In this section, we add code to liquid to hide the product from appearing in collection

Find the {% include 'product-loop' with collection.handle %} liquid tag for showing all products in catalog and replace it by

{% assign isFreeGift=false %}

{% for tag in product.tags %}

   {% if tag =='SECOMAPP_FREEGIFT'%}

      {% assign isFreeGift=true %}

   {% endif %}

{% endfor %}

{% if isFreeGift == false %}

   {% include 'product-loop' with collection.handle %}

{% endif %}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk