【发布时间】:2019-10-31 17:44:36
【问题描述】:
我的商店有 10 种产品。
其中一个是杂志订阅,有 3 种变体:6 个月、1 年和 2 年
我使用自定义模板制作了产品页面,并使用简单的 html 插入了价格,如下所示:
价格:25 美元,其他款式以此类推...
现在我正在做一些促销,所以我想更新价格而不必在主题中更改它,我正在尝试类似的方法来使其工作但没有成功:
{% assign semestraleid = '18773651783776' %}{% variant.id == semestraleid %} {{ current_variant.price | money }} {% if current_variant.compare_at_price > current_variant.price %} <s style="color: #B8DAEE; font-size: 0.85em;">{{ current_variant.compare_at_price | money }}</s> {% endif %} {% endif %}
所以问题来了:如何在这个单页产品页面中显示每个变体的真实价格,以及代码片段的确切位置?
谢谢
PS:我还尝试使用分配和拆分进行其他一些实验,我已经成功打印了每个变体的价格,但之后我不知道如何正确显示价格像。
【问题讨论】:
标签: shopify liquid shopify-template