コレクションの商品数 Number of items per page in the collection

DAWNテーマを使用しています。

コレクションや検索結果の、1ページあたりの商品数を増やしたいのですが、どうすればよいでしょうか。現在は最大で24までしか変更が出来ません。

It uses the DAWN theme.

How can I increase the number of items per page in my collection and search results? Currently, the maximum display limit is 24.

表示する個数を固定してしまう方法とカスタマイズ画面の最大表示個数を変える方法の2通りが考えられます。

ファイル名:main-collection-product-grid.liquid

1、表示する個数を固定する

内にある {%- paginate collection.products by section.settings.products_per_page -%}のby以降に任意の数字を入れる 例){%- paginate collection.products by 30 -%}

->30個表示。変更したい場合はこの数字を書き換える。

2、カスタマイズ画面の最大表示個数を変える
{% schema %}内の"id": "products_per_page"部分のmaxを任意の値に変える
※stepで割り切れる値にする必要があります
(stepとはminとmaxで指定した範囲内で何段階で表示数を変更できるかのことです)

例)
“type”: “range”,
“id”: “products_per_page”,
“min”: 8,
“max”: 36,
“step”: 4,
“default”: 16,
“label”: “t:sections.main-collection-product-grid.settings.products_per_page.label”

上記設定だと、カスタマイズ画面->コレクション->デフォルトのコレクション->商品グリッド->ページあたりの商品数の最大値が36になります

1 Like