Hey there,
I got this snippet in my cart.template.liquid:
{% unless item.variant.title contains 'Default' %}
<p class="table-shopping-cart-item-variant">{{ item.variant.title | escape }}</p>
{% endunless %}
What would i need to add to hide the {{ item.variant.title | escape }} when the variant contains 'sq'?
The background is: I use some variants that don't have a correct name but are used for a calculation. They have names like 1.00sq/2.00sq etc. I don't want those to appear in the cart (and anywhere else, if possible).
I am new to liquid code and therefore have no clue how to solve this.
Hi @rockandstars,
Please change 'Default' => 'sq', it will work fine.
{% unless item.variant.title contains 'sq' %}
<p class="table-shopping-cart-item-variant">{{ item.variant.title | escape }}</p>
{% endunless %}
Hope it helps!
User | RANK |
---|---|
40 | |
33 | |
13 | |
10 | |
8 |