Html 针对shopify中的不同模板 {%if product.type='Patio Furniture/Salsa Table%} {%endif%}
我需要针对两个名为Html 针对shopify中的不同模板 {%if product.type='Patio Furniture/Salsa Table%} {%endif%},html,css,shopify,Html,Css,Shopify,我需要针对两个名为product.no variant和product.jacquard桌布的专门模板 这部分应该放在这里{%if product.type=='Patio Furniture/Salsa Table%} 我非常确定产品。type只是使用了错误的后缀,我需要正确的后缀。1)您确定这就是产品类型吗?您可以尝试打印产品类型以确保 {{product.type}} 2) 您能在产品描述中使用“包含”吗 {%if products.type包含“庭院家具”或products.type包含
product.no variant
和product.jacquard桌布的专门模板
这部分应该放在这里{%if product.type=='Patio Furniture/Salsa Table%}
我非常确定产品。type
只是使用了错误的后缀,我需要正确的后缀。1)您确定这就是产品类型吗?您可以尝试打印产品类型以确保
{{product.type}}
2) 您能在产品描述中使用“包含”吗
{%if products.type包含“庭院家具”或products.type包含“莎莎餐桌”}
3) 以下是-标签是更好的选择吗
4) 请记住,在某些字段比较中,您可能需要使用downcase。1)您确定这确实是产品类型吗?您可以尝试打印产品类型以确保
{{product.type}}
2) 您能在产品描述中使用“包含”吗
{%if products.type包含“庭院家具”或products.type包含“莎莎餐桌”}
3) 以下是-标签是更好的选择吗
4) 请记住,对于某些字段的比较,您可能需要进行简化。我相信您正在寻找产品。模板\u后缀
Shopify在这里提供了一份备忘单,可能会对您有所帮助
我相信您正在寻找产品。模板\u后缀
Shopify在这里提供了一份备忘单,可能会对您有所帮助
你要找的是
{% if product.type == 'Patio Furniture/Salsa Table' %}
<div id="dotted" style="height: auto;border-bottom:0px;text-align: center;" class="grid-uniform wrapper">
<div class="grid__item large--one-whole">
<img alt="woman wearing colorful apron while working with bread doe in the kitchen" src="https://cdn.shopify.com/s/files/1/1418/7648/files/BERLIN_Maud_Chalard_pour_Fermob_9.jpg?1296570615214079092">
</div>
</div>
{% endif %}
注意:{{product.template_suffix}}
仅在您只想打印当前模板的名称时有用,在您的情况下,该模板将显示“jacquard TableCloth”。您要查找的是
{% if product.type == 'Patio Furniture/Salsa Table' %}
<div id="dotted" style="height: auto;border-bottom:0px;text-align: center;" class="grid-uniform wrapper">
<div class="grid__item large--one-whole">
<img alt="woman wearing colorful apron while working with bread doe in the kitchen" src="https://cdn.shopify.com/s/files/1/1418/7648/files/BERLIN_Maud_Chalard_pour_Fermob_9.jpg?1296570615214079092">
</div>
</div>
{% endif %}
注意:{{product.template_suffix}}
仅在您希望打印当前模板的名称时有用,在您的情况下,该模板将显示“jacquard TableCloth”.为什么不在“管理仪表板”的“产品”页面中的“产品”级别设置模板?我确实设置了模板,因为这些模板是特殊的模板,所以无法定位这些模板。product.no-variant和product jacquard桌布为什么不在管理仪表板的产品页面中的产品级别设置模板?我确实设置了模板,因为这些模板是特殊模板,所以无法定位这些模板。产品。无变体和产品提花台布我想保留这个配方。对于名为product.no-variant和product.jacquard-TableCloth的专业模板,我只需要在代码{%if product.type=='product%}中放置什么来代替product.type。我希望保留此公式。我只需要在名为product.no-variant和product.jacquard桌布的专业模板的代码{%if product.type=='product%}中放置什么来代替product.type{%if product.template_suffix=='Patio Furniture/Salsa Table%}{%endif%}因为某些原因,这不起作用也许我误解了你的问题?我以为你在尝试使用模板product.no variant
和product.jacquard桌布
在这种情况下,模板后缀将是no variant
和jacquard桌布
。也许你可以再解释一下你想做什么?你可以在你的管理员中将模板应用到不同的产品上。我只是尝试将图像添加到特定的产品上,但因为它们位于不同的模板上。这不管用。{%if product.template_suffix='jacquard桌布“%}{%endif%}仍然不确定我是否理解正确?因此,您有两个产品模板,并根据要显示特定图像的产品选择哪一个模板?{%if product.template_suffix=='Patio Furniture/Salsa Table%}{%endif%}出于某种原因,这不起作用也许我误解了您的问题?我以为你在尝试使用模板product.no variant
和product.jacquard桌布
在这种情况下,模板后缀将是no variant
和jacquard桌布
。也许你可以再解释一下你想做什么?你可以在你的管理员中将模板应用到不同的产品上。我只是尝试将图像添加到特定的产品上,但因为它们位于不同的模板上。这不管用。{%if product.template_suffix='jacquard桌布“%}{%endif%}仍然不确定我是否理解正确?所以,您有两个产品模板,根据哪个模板选择要显示特定图像的产品?