3
0

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で複数のコレクションを表示する

Posted at

複数のコレクションを表示する

結論

{{ collections.COLLECTION_NAME.title }}
{% for product in collections.COLLECTION_NAME.products %}
//コレクションのアイテムを表示する記述
{% endfor %}

必要となった経緯

運営しているショッピングサイトで、1つのページに対して夏物、秋物など複数のコレクションを1ページに表示したかった。
トップページであれば管理画面から表示することができたが、
今回はコレクション画面にて複数のコレクションを表示したかったので、コードで対応することとした。

3
0
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?