【发布时间】:2016-11-29 19:05:44
【问题描述】:
我正在尝试让客户能够按产品 SKU 编号对产品/系列页面进行排序。我不确定这是否可以通过 Shopify 的流动代码完成,但我想我会看看是否有人可以确认或知道可能的替代解决方案。
排序选项是 Shopify 中的常见功能,并且出现在大多数主题中,如下所示:
排序代码:
<select name="sortBy" id="sortBy">
<option value="manual">{{ 'collections.sorting.featured' | t }}</option>
<option value="best-selling">{{ 'collections.sorting.best_selling' | t }}</option>
<option value="title-ascending">{{ 'collections.sorting.az' | t }}</option>
<option value="title-descending">{{ 'collections.sorting.za' | t }}</option>
<option value="price-ascending">{{ 'collections.sorting.price_ascending' | t }}</option>
<option value="price-descending">{{ 'collections.sorting.price_descending' | t }}</option>
<option value="created-descending">{{ 'collections.sorting.date_descending' | t }}</option>
<option value="created-ascending">{{ 'collections.sorting.date_ascending' | t }}</option>
</select>
【问题讨论】: