Php 无法使用液体排序对产品进行排序:

Php 无法使用液体排序对产品进行排序:,php,shopify,liquid,Php,Shopify,Liquid,我正在为一个家庭朋友做一些工作,他们在伊泽特尔有一家使用液体模板的商店。我试图按重量对我的产品进行分类,但运气不好。我甚至不能使用{{variable | json}记录任何数据。我已经很久没有接触过php了,也从来没有使用过像现在这样挣扎的液体 <ul class="tiles"> {% assign sortedItems = (category.items | sort: 'item.quantity_unit') %} {% for item in sortedIte

我正在为一个家庭朋友做一些工作,他们在伊泽特尔有一家使用液体模板的商店。我试图按重量对我的产品进行分类,但运气不好。我甚至不能使用
{{variable | json}
记录任何数据。我已经很久没有接触过php了,也从来没有使用过像现在这样挣扎的液体

<ul class="tiles">
  {% assign sortedItems = (category.items | sort: 'item.quantity_unit') %}
  {% for item in sortedItems %}
    {{ item | json }}
    {% include tile-item.liquid %}
  {% endfor %}
</ul>
    {%assign sortedItems=(category.items | sort:'item.quantity_unit')%} {sortedItems%中的项的%s} {{item | json}} {%include-tile-item.liquid%} {%endfor%}

根本不会改变顺序。不要从
{{item | json}}
获取任何输出。我不知道为什么
数据不可访问

{{sortedItems | json}}返回什么


您可以尝试从分配中删除“()”。

在普通液体中,这是有效的:
{%assign sortedItems=(category.items | sort:'quantity_unit')%}


但遗憾的是,你的问题是基于没有人能看到的代码。更好的选择是向iZettle支持人员询问这个问题。

结果表明,iZettle完全限制了您可以使用的液体模板选项