【发布时间】:2019-08-06 03:42:17
【问题描述】:
我目前已将价格范围添加到我的收藏页面,使用这篇文章作为指导:https://www.shopify.ca/partners/blog/collection-page-price-range
我现在正试图在我的搜索结果页面上显示价格范围,但由于某种原因,以下代码跳过了我的 elsif:
{% if item.compare_at_price_min > item.price_min %}
<p class="price sale"><span class="label">{% comment %}ly_i18n_replace_for_[ 'products.product.on_sale' | t ]_begin{% endcomment %}{% capture ly_template %}{{ 'products.product.on_sale' | t }}{% endcapture %}{% include 'ly-static-string' with '12794199' %}{% if ly_translation %}{% assign escape_content = true %}{% assign ly_template = ly_translation %}{% else %}{% assign escape_content = false %}{% endif %}{% if escape_content %}{{ ly_template | escape}}{% else %}{{ ly_template }}{% endif %}{% comment %}ly_i18n_replace_end{% endcomment %}</span> <span class="original money">{{ item.compare_at_price_min | money }}</span> <span class="money">{{ item.price_min | money }}</span></p>
{% elsif product.price_varies %}
<p class="price sale"><span class="label"> {{ product.price_min | money }} - {{ product.price_max | money }} </span></p>
{% else %}
<p class="price"><span class="money">{{ item.price_min | money }}</span></p>
{% endif %}
我正在测试在产品系列页面上显示价格范围且价格可变的产品。但搜索结果页面上显示的价格只是最低价格选项。
【问题讨论】: