0
{% for tag in product %}
{% if product.tags contains new %}
<span>Test</span>
{% endif %}
{% endfor %}
我需要的产品看,如果一个产品有一个叫new
标签然后显示一个span标签如果不是则什么都没有。Shopify检查为标签[液体]
由于某些原因,这段代码不起作用。
{% for tag in product %}
{% if product.tags contains new %}
<span>Test</span>
{% endif %}
{% endfor %}
我需要的产品看,如果一个产品有一个叫new
标签然后显示一个span标签如果不是则什么都没有。Shopify检查为标签[液体]
由于某些原因,这段代码不起作用。
这可以做的工作:
{% for product in products %}
{% if product.tags contains "new" %}
<span>Test</span>
{% endif %}
{% endfor %}