liquid - Shopify vendor if statement -
a shopify liquid question:
if no vendor available, shopify adds shop name default vendor. i'd instances blank.
i'm trying create if statement hides vendor if there no vendor or if equals default vendor name.
here's i've come far , i'm stuck
<div class="prod-caption">{% if product.vendor == 'test' %} {% else %} {{ product.vendor }} {% endif %} {{ product.title }}</div>
i want on product page in product grid item snippet
can help?
what you've got looks should work (assuming replace 'test' shop's name), i'd write if statement this:
{% if product.vendor != shop.name %}{{ product.vendor }}{% endif %} {{ product.title }}
this work in both product.liquid , product-grid-item.liquid. (just search {{ product.title }}
, replace code above.)
Comments
Post a Comment