# コレクションの商品表示について

**URL:** <https://community.shopify.com/t/topic/18872>\
**Category:** 技術的なQ＆A\
**Created:** [August 25, 2020, 12:21am UTC](https://community.shopify.com/t/topic/18872 "2020-08-25T00:21:52Z")\
**Posts on this page:** 3\
**Page:** 1

## AI-generated summary

コレクションに追加した商品・画像・価格が表示されない問題についての技術相談。Udemy教材を参考にShopifyテーマのLiquidコードを編集していたが、CSVで商品を登録してもフロントに反映されず、コード自体は教材通りに見えるという状況だった。 

指摘された主な原因は、Liquidオブジェクトが正しく評価されず文字列として扱われている可能性。特に `{{ product.url }}` のような出力記法で、波括弧内の記述を見直すよう助言があり、Liquid（Shopifyのテンプレート言語）の基本的な書式確認用の公式参考情報も案内された。 

その後、投稿者が `{{ }}` 部分をすべて書き直したところ正常に表示されるようになったと報告。原因はLiquidの出力記法の記述ミスで、商品データやCSVインポート自体ではなかった。問題は解決済み。

<div class="post-metadata">

**Author:** ![kumansman](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@kumansman](https://community.shopify.com/u/kumansman)\
**Post date:** [August 25, 2020, 12:21am UTC](https://community.shopify.com/t/topic/18872/1 "2020-08-25T00:21:52Z")

</div>

Udemy(Build a Shopify Theme from scratch)[https://www.udemy.com/share/1023tcAEIddF9bRn0D/](https://www.udemy.com/share/1023tcAEIddF9bRn0D/)

の教材に沿ってliquidのコード編集をしています。

【質問内容】

コレクションに追加した商品・画像・価格が反映されません。

商品登録はインポートでcsvから引っ張ってきております。

コードは教材と照らし合わせて問題ないかと思っているのですが、どういう問題が考えられますでしょうか。

初歩的な質問で申し訳ございませんが、アドバイス頂けるとありがたいです。

 ![【画像1】](https://canada1.discourse-cdn.com/shopifyforum/original/3X/7/f/7fdb8b410302278639e0efbc2e02b3bfa034e20f.jpeg)

 ![【画像2】](https://canada1.discourse-cdn.com/shopifyforum/original/3X/8/4/844bd708156b0157ff27595382de9eb043f708e4.jpeg)

```ruby

{% schema %}
  {
    "name": "Homepage Products",
    "settings": [
      {
        "type": "text",
        "id": "title",
        "label": "Heading",
        "default": "Tranding Products"
      },
      {
        "type": "collection",
        "id": "collection",
        "label": "Collection"
      },
      {
        "type": "range",
        "id": "product_limit",
        "label": "Product Limit",
        "min": 3,
        "max": 9,
        "default": 6
      }
    ]
  }
{% endschema %}

```

---

<div class="post-metadata">

**Author:** ![junichiokamura](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/junichiokamura/32/299737_2.png) [@junichiokamura](https://community.shopify.com/u/junichiokamura)\
**Post date:** [August 25, 2020, 12:54am UTC](https://community.shopify.com/t/topic/18872/2 "2020-08-25T00:54:58Z")

</div>

セクションのプレビューをみると、LiquidのObjectが、そのままテキスト処理されているように見えるので、 {{ product.url }} のように、括弧と変数の間にスペースを入れてみても同じでしょうか？

参考

[https://www.shopify.jp/blog/partner-shopify-template-language-liquid-overview](https://www.shopify.jp/blog/partner-shopify-template-language-liquid-overview)

[https://shopify.dev/docs/themes/liquid/reference](https://shopify.dev/docs/themes/liquid/reference)

---

<div class="post-metadata">

**Author:** ![kumansman](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@kumansman](https://community.shopify.com/u/kumansman)\
**Post date:** [August 25, 2020, 1:22am UTC](https://community.shopify.com/t/topic/18872/3 "2020-08-25T01:22:20Z")

</div>

junichiokamura様

ご連絡ありがとうございます。

早速、ご指摘いただいた所、修正いたしました。

{{ }}のところがうまく読み込めておらず、全て{{ }}を書き直したら直りました。

お忙しいところ、初歩的なミスにアドバイスいただきありがとうございました。
