Question : how to add condition of product in shopify
Answered by : loreto
{% if product.id == 7452109144281 %} <p class="shortdescription">{{ product.description | strip_html | truncatewords: 41, "" }}</p> {% elsif product.id == 7450816381145 or product.id == 7442425675993 %} <p class="shortdescription">{{ product.description | strip_html | truncatewords: 19, "" }}</p> {% else %} <p class="shortdescription">{{ product.description | strip_html | truncatewords: 21, "" }}</p> {% endif %}
Source : | Last Update : Wed, 09 Feb 22