小部件宽度差异价格(Shopify)
我将要在我的Shopify网站上集成桑坦德小部件,但是我需要用价格变量替换数据量: https://www.dropbox.com/s/cf025mnb5lr8j9m/satander_widget.jpg?dl = 0
我试图使用 data-amount =“ {{{ current_variant.price}}}“>
,但发生了变化。
知道为什么它不起作用吗?我正在使用current_variant.price其他位置在产品页面上
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
current_variant
不是Shopify的默认变量。这是主题设置在某个地方设置的典型性。您只需要确保自己在该变量的范围内即可。
搜索
current_variant =
,您会找到设置的位置,通常这是值{% - nistion current_variant = product.selected_or_first_available_variant-%}
current_variant
is not a default variable of Shopify. It is something that typicall the theme is setting, somewhere.You just need to be sure that you're inside the scope of that variable.
Search for
current_variant =
and you will find where is set, normally this is the value{%- assign current_variant = product.selected_or_first_available_variant -%}