Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shopify &引用;产品标签“;在购物车里_Shopify - Fatal编程技术网

Shopify &引用;产品标签“;在购物车里

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

我希望在我的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://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”%}。。。做那件事