Shopify基本价格指示
我试着为我的德国Shopify商店做一个基本的价格指示。在这一行中,我试图给出基本价格,即:product.price/first variant value*10,但我不知道如何从中获得值。也许有人能帮我 我希望我的描述是完整的 (共有3组变体,但只有1.很重要,因此它必须类似于product options selector=0或其他) 谢谢Shopify基本价格指示,shopify,liquid,Shopify,Liquid,我试着为我的德国Shopify商店做一个基本的价格指示。在这一行中,我试图给出基本价格,即:product.price/first variant value*10,但我不知道如何从中获得值。也许有人能帮我 我希望我的描述是完整的 (共有3组变体,但只有1.很重要,因此它必须类似于product options selector=0或其他) 谢谢 Grundpreis:{{product.price |除以| u:product.option.selected |值|乘以:10 | money}
Grundpreis:{{product.price |除以| u:product.option.selected |值|乘以:10 | money}}/米
{如果当前变量为%0,则在当前变量为%0时比较价格>当前变量为%0时比较价格%}
{{'products.product.regular|u price'|t}
{{current_variant.compare_at_price|money}
{{current_variant.price{124; money}}
{{'products.product.on|t}
{%else%}
{{'products.product.regular|u price'|t}
{{current_variant.compare_at_price|money}
{{current_variant.price{124; money}}
{{'products.product.on|t}
{%endif%}
Grundpreis:{{product.price |除以:product.option.selected | value | money}}/Meter
{%除非product.options.size==1和product.variants[0]。title=='默认标题'%}
{product.options_中的选项的百分比,值为%}
{{option.name}
{option.values%%中的值为%
{{value}}
{%endfor%}
{%endfor%}
{%end除非%}
这个变量是什么<代码>产品选项。所选的_值产品对象没有此变量。您告诉我您正在尝试实现product.price/first variant value*10
。但是你所说的第一个变量值是什么意思呢?我现在发现,Grundpreis:{{product.price | times:current_variant.option1 |除以:1000 | money}米
是正确的方法,但当我这样做时,它只会对prince进行一次调用,而不是对everx产品:/我仍然不确定,你想达到什么目的。你说的是每种产品的?你的意思是每种产品的变体?这个变量是什么<代码>产品选项。所选的_值
产品对象没有此变量。您告诉我您正在尝试实现product.price/first variant value*10
。但是你所说的第一个变量值是什么意思呢?我现在发现,Grundpreis:{{product.price | times:current_variant.option1 |除以:1000 | money}米
是正确的方法,但当我这样做时,它只会对prince进行一次调用,而不是对everx产品:/我仍然不确定,你想达到什么目的。你说的是每种产品的?你的意思是针对每种产品变型?
<p class="hint">Grundpreis: {{ product.price | divided_by: product.option.selected_value | times: 10 | money }}/Meter</p>
</p>
<p class="product-single__price product-single__price-{{ section.id }}{% unless current_variant.available %} product-price--sold-out{% endunless %}">
{% if current_variant.compare_at_price > current_variant.price %}
<span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
<s id="ComparePrice-{{ section.id }}">{{ current_variant.compare_at_price | money }}</s>
<span class="product-price__price product-price__price-{{ section.id }} product-price__sale product-price__sale--single">
<span id="ProductPrice-{{ section.id }}"
itemprop="price" content="{{ current_variant.price | divided_by: 100.00 }}">
{{ current_variant.price | money }}
</span>
<span class="product-price__sale-label product-price__sale-label-{{ section.id }}">{{ 'products.product.on_sale' | t }}</span>
</span>
{% else %}
<span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
<s id="ComparePrice-{{ section.id }}" class="hide">{{ current_variant.compare_at_price | money }}</s>
<span class="product-price__price product-price__price-{{ section.id }}">
<span id="ProductPrice-{{ section.id }}"
itemprop="price" content="{{ current_variant.price | divided_by: 100.00 }}">
{{ current_variant.price | money }}
</span>
<span class="product-price__sale-label product-price__sale-label-{{ section.id }} hide">{{ 'products.product.on_sale' | t }}</span>
</span>
{% endif %}
<p class="hint">Grundpreis: {{ product.price | divided_by: product.option.selected_value | money }}/Meter</p>
</p>
<form action="/cart/add" method="post" enctype="multipart/form-data" class="product-form product-form-{{ section.id }}{% unless section.settings.show_variant_labels %} product-form--hide-variant-labels{% endunless %}" data-section="{{ section.id }}">
{% unless product.options.size == 1 and product.variants[0].title == 'Default Title' %}
{% for option in product.options_with_values %}
<div class="selector-wrapper js product-form__item">
<label {% if option.name == 'default' %}class="label--hidden" {% endif %}for="SingleOptionSelector-{{ forloop.index0 }}">
{{ option.name }}
</label>
<select class="single-option-selector single-option-selector-{{ section.id }} product-form__input" id="SingleOptionSelector-{{ forloop.index0 }}" data-index="option{{ forloop.index }}">
{% for value in option.values %}
<option value="{{ value | escape }}"{% if option.selected_value == value %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</select>
</div>
{% endfor %}
{% endunless %}