Shopify &引用;产品标签“;在购物车里
我希望在我的Shopify商店的“谢谢”页面的HTML中显示一个特定的图像(带有出站链接)。我想让它显示购物车中是否有任何带有特定标签(Shopify &引用;产品标签“;在购物车里,shopify,Shopify,我希望在我的Shopify商店的“谢谢”页面的HTML中显示一个特定的图像(带有出站链接)。我想让它显示购物车中是否有任何带有特定标签(stb)的产品 {% for product in cart.items.products %} {% assign product_tags_string = product.tags | join ' ' %} {% if product_tags_string contains 'stb' %} <p><a href="http://ww
stb
)的产品
{% for product in cart.items.products %}
{% assign product_tags_string = product.tags | join ' ' %}
{% if product_tags_string contains 'stb' %}
<p><a href="http://www.sharethebus.com" target="_blank" title="Book your bus ticket here"><img src="//cdn.shopify.com/s/files/1/0256/7469/files/FB_Meals_Token_large.png?11171876204102072109" /></a>
</p>
{% endif %}
{% endfor %}
{cart.items.products%中产品的%
{%assign product_tags_string=product.tags|join'%}
{%如果产品标签字符串包含“stb”}
{%endif%}
{%endfor%}
试试这个:
{% for item in cart.items %}
{% assign product_tags_string = item.product.tags | join ' ' %}
...
{% endfor %}
购物车中的商品。商品
则商品具有商品标签<代码>{%if item.product.tags包含“stb”%}。。。做那件事