【发布时间】:2014-08-04 16:34:25
【问题描述】:
我正在尝试将我所有的产品添加到首页,而不仅仅是选择 3 个,如果有人能指出我正确的方向,那我是 shopify 的主要新手。
{% for product in collections.frontpage.products %}
{% include 'product' with product %}
{% endfor %}
【问题讨论】:
我正在尝试将我所有的产品添加到首页,而不仅仅是选择 3 个,如果有人能指出我正确的方向,那我是 shopify 的主要新手。
{% for product in collections.frontpage.products %}
{% include 'product' with product %}
{% endfor %}
【问题讨论】:
你可以试试:
{% for product in collections.all.products %}
{% include 'product' with product %}
{% endfor %}
尽管更改您的frontpage 集合以包含所有产品可能会更好。使用条件为Product price is greater than 0 的智能集合。
如果您有超过 50 种产品,则需要使用 pagination。
这是一个类似的问题:How do I display all of my products on my home page using Shopify and Liquid?。
【讨论】: