1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Shopify] ミニハック、商品一覧のデフォ並び順をカスタマイズしたい

Last updated at Posted at 2020-07-06

ミニハックシリーズ(続かないかもしれない)

Shopify/Debutでストアー構築、商品一覧ページを出す際に画面に表示されるデフォ並び順を手動(=ベストセラー)に指定したいということで、ミニハック。

デフォ表示

下記のように商品一覧をクリックすると
デフォ、アルファベット順に並んでいます。

image.png

Collection/allを作成する

ここのUrlを読み取ると collections/all ということで、
これを自分でカスタマイズしたい場合は all というコレクションを作成してみます。

image.png

コレクションページの下部分でhandleを指定します

image.png

表示される商品の指定

とりあえず %を含む商品はなさそうなので、%を含まない商品すべてとします。ここは表示したい商品のロジックであればなんでもOKです。

並び順の指定

下記のように表示された一覧のデフォの並び順を指定します。

image.png

確認

そうすると商品一覧の並び替え順番が指定した通りになります。

image.png

募集

Shopify開発を一緒にするメンバー募集中。ガンガンご応募ください。 C#, Azure, Shopify こんなテックストックです。

プロマネも募集中です。詳細に関しては下記をご参照ください。
https://t-rnd.com/Jobs/

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?