{% LIQUID REFERENCE %}
Shopify Liquid チートシート / コレクション・カート・注文
収録 64 項目 | 仕様確認 2026年10月(shopify.dev)
コレクション・絞り込み(filter)・検索・ページ送りと、カート・ラインアイテム・注文・割引・ギフトカードのオブジェクトをまとめました。
コレクション・検索・ページ送り
collection
オブジェクト1つのコレクション(商品のグループ)の情報です。
書き方
{{ collection.title }}
コレクションページで自動で使えます。他のページでは collections['handle'] で取り出します。
例
<h1>{{ collection.title }}</h1>
<p>{{ collection.products_count }}商品</p>
主要プロパティ(下に説明あり)
collection.title collection.url collection.products collection.products_count collection.all_products_count collection.description collection.image collection.filters collection.sort_by collection.all_tags collection.metafields
その他のプロパティ(14件・名前のみ。クリックで shopify.dev の説明へ)
id handle template_suffix current_vendor current_type published_at sort_options default_sort_by next_product previous_product tags all_types all_vendors featured_image
collection.title
プロパティコレクションのタイトルです。
書き方
{{ collection.title }}
例
<h1>{{ collection.title }}</h1>
collection.url
プロパティコレクションページの URL です。
書き方
{{ collection.url }}
例
<a href="{{ collection.url }}">一覧を見る</a>
出力
/collections/tops
collection.products
プロパティコレクションの商品の配列です。
書き方
{% for product in collection.products %}
50件を超える場合は paginate タグで囲みます。
例
{% for product in collection.products limit: 8 %}{{ product.title }}{% endfor %}
collection.products_count
プロパティ(絞り込み後の)商品数です。
書き方
{{ collection.products_count }}
例
{{ collection.products_count }}件
collection.all_products_count
プロパティ絞り込み前の全商品数です。
書き方
{{ collection.all_products_count }}
例
全{{ collection.all_products_count }}件
collection.description
プロパティコレクションの説明文です。
書き方
{{ collection.description }}
例
{{ collection.description }}
collection.image
プロパティコレクション画像です。
書き方
{{ collection.image }}
例
{{ collection.image | image_url: width: 1200 | image_tag }}
collection.filters
プロパティ使える絞り込み項目の配列です。
書き方
{% for filter in collection.filters %}
例
{{ collection.filters.size }}
collection.sort_by
プロパティ現在の並び順です。
書き方
{{ collection.sort_by }}
例
{{ collection.sort_by | default: collection.default_sort_by }}
collection.metafields
プロパティコレクションのメタフィールドです。
書き方
{{ collection.metafields.custom.キー.value }}
例
{{ collection.metafields.custom.lead.value }}
collections
オブジェクトストアのすべてのコレクションです。ハンドルで1つを取り出せます。
書き方
{{ collections['handle'] }}
例
{% for p in collections['new-arrivals'].products limit: 4 %}{{ p.title }}{% endfor %}
filter
オブジェクトコレクションや検索結果の絞り込み項目(価格・在庫・メタフィールドなど)です。
書き方
{{ filter.label }}
Search & Discovery アプリで設定した絞り込みが collection.filters に入ります。
例
{% for filter in collection.filters %}
<h3>{{ filter.label }}</h3>
{% endfor %}
プロパティ(14件・名前のみ。クリックで shopify.dev の説明へ)
param_name label operator type active_values inactive_values values false_value true_value max_value min_value range_max url_to_remove presentation
filter_value
オブジェクト絞り込み項目の中の選択肢1つです。
書き方
{{ value.label }} ({{ value.count }})
url_to_add / url_to_remove で、選択・解除したときの URL が取れます。
例
{% for value in filter.values %}<a href="{{ value.url_to_add }}">{{ value.label }} ({{ value.count }})</a>{% endfor %}
プロパティ(10件・名前のみ。クリックで shopify.dev の説明へ)
param_name value active count label url_to_add url_to_remove display(非推奨) swatch image
filter_value_display
オブジェクト非推奨絞り込み値の見た目(色・画像)を表す古いオブジェクトです。
書き方
{{ value.display }}
非推奨です。swatch に置き換えます。
非推奨 代わりに:swatch
例
{{ value.swatch.color }}
sort_option
オブジェクトコレクションの並び替えの選択肢です。
書き方
{{ option.name }}
例
{% for option in collection.sort_options %}<option value="{{ option.value }}">{{ option.name }}</option>{% endfor %}
search
オブジェクトストア内検索の検索語と結果です。
書き方
{{ search.terms }}
検索ページで使えます。結果には商品・記事・ページが混ざるため object_type で判定します。
例
{% for item in search.results %}
{% if item.object_type == 'product' %}{{ item.title }}{% endif %}
{% endfor %}
主要プロパティ(下に説明あり)
search.terms search.results_count
その他のプロパティ(7件・名前のみ。クリックで shopify.dev の説明へ)
filters performed results sort_options sort_by default_sort_by types
search.terms
プロパティ入力された検索語です。
書き方
{{ search.terms }}
出力するときは escape を付けます。
例
「{{ search.terms | escape }}」の検索結果
search.results_count
プロパティ検索結果の件数です。
書き方
{{ search.results_count }}
例
{{ search.results_count }}件
predictive_search
オブジェクト入力中に候補を出す予測検索の結果です。
書き方
{{ predictive_search.resources.products }}
予測検索 API で読み込んだセクションの中で使います。
例
{% for p in predictive_search.resources.products %}{{ p.title }}{% endfor %}
predictive_search_resources
オブジェクト予測検索の結果を、種類(商品・コレクション・記事など)ごとに分けたものです。
書き方
{{ predictive_search.resources.products.size }}
例
{% if predictive_search.resources.articles.size > 0 %}記事あり{% endif %}
プロパティ(4件・名前のみ。クリックで shopify.dev の説明へ)
paginate
オブジェクトpaginate タグの中で使える、ページ送りの情報です。
書き方
{{ paginate.current_page }}
現在のページ番号・総ページ数・前後のページへの URL などを持ちます。
例
{% if paginate.next %}<a href="{{ paginate.next.url }}">次へ</a>{% endif %}
主要プロパティ(下に説明あり)
paginate.pages
その他のプロパティ(8件・名前のみ。クリックで shopify.dev の説明へ)
page_size current_offset current_page items parts next previous page_param
paginate.pages
プロパティ総ページ数です。
書き方
{{ paginate.pages }}
例
{{ paginate.current_page }} / {{ paginate.pages }}
出力
2 / 5
part
オブジェクトページ送りの各リンク(ページ番号や「…」)1つ分です。
書き方
{{ part.title }}
例
{% for part in paginate.parts %}{% if part.is_link %}<a href="{{ part.url }}">{{ part.title }}</a>{% else %}{{ part.title }}{% endif %}{% endfor %}
current_page
オブジェクトページ送りの現在のページ番号です。
書き方
{{ current_page }}
例
{% if current_page > 1 %}{{ current_page }}ページ目{% endif %}
出力
2ページ目
カート・注文
cart
オブジェクト訪問者のカートの情報(商品・数量・合計金額)です。
書き方
{{ cart.item_count }}
どのページでも使えます。カートの中身を JavaScript で変えた後は、Liquid の値は再読み込みするまで更新されない点に注意します。
例
{% if cart.item_count > 0 %}
合計 {{ cart.total_price | money }}
{% endif %}
出力
合計 ¥6,600
主要プロパティ(下に説明あり)
cart.items cart.item_count cart.total_price cart.total_discount cart.note cart.attributes
その他のプロパティ(12件・名前のみ。クリックで shopify.dev の説明へ)
requires_shipping checkout_charge_amount original_total_price items_subtotal_price empty? currency total_weight discount_applications cart_level_discount_applications discounts(非推奨) taxes_included duties_included
cart.items
プロパティカート内の明細の配列です。
書き方
{% for item in cart.items %}
例
{% for item in cart.items %}{{ item.title }}{% endfor %}
cart.item_count
プロパティカート内の商品の合計数量です。
書き方
{{ cart.item_count }}
ヘッダーのカートアイコンの数字によく使います。
例
<span class="count">{{ cart.item_count }}</span>
出力
3
cart.total_price
プロパティ割引適用後のカートの合計金額です。
書き方
{{ cart.total_price | money }}
例
{{ cart.total_price | money }}
出力
¥6,600
cart.total_discount
プロパティカートの割引額の合計です。
書き方
{{ cart.total_discount | money }}
例
{% if cart.total_discount > 0 %}-{{ cart.total_discount | money }}{% endif %}
cart.note
プロパティカートの備考欄の内容です。
書き方
{{ cart.note }}
例
<textarea name="note">{{ cart.note }}</textarea>
cart.attributes
プロパティカートに付けた追加情報(配送希望日など)です。
書き方
{{ cart.attributes.キー }}
フォームで attributes[名前] として送った値が入ります。
例
<input name="attributes[配送希望日]" value="{{ cart.attributes['配送希望日'] }}">
line_item
オブジェクトカートや注文の明細1行分(商品・数量・金額)です。
書き方
{{ item.title }}
例
{% for item in cart.items %}
{{ item.product.title }} × {{ item.quantity }} = {{ item.final_line_price | money }}
{% endfor %}
主要プロパティ(下に説明あり)
line_item.quantity line_item.final_line_price line_item.final_price line_item.properties line_item.price
その他のプロパティ(37件・名前のみ。クリックで shopify.dev の説明へ)
id line_price(非推奨) total_discount(非推奨) discount_allocations variant_id product_id product variant tax_lines fulfillment successfully_fulfilled_quantity fulfillment_service unit_price_measurement unit_price sku message vendor title taxable original_price original_line_price line_level_total_discount line_level_discount_allocations discounts(非推奨) gift_card requires_shipping options_with_values key grams url url_to_remove image selling_plan_allocation item_components instructions parent_relationship error_message
line_item.quantity
プロパティ明細の数量です。
書き方
{{ item.quantity }}
例
{{ item.quantity }}点
line_item.final_line_price
プロパティ割引後の明細の合計金額(単価×数量)です。
書き方
{{ item.final_line_price | money }}
非推奨の line_price の代わりに使います。
例
{{ item.final_line_price | money }}
line_item.final_price
プロパティ割引後の単価です。
書き方
{{ item.final_price | money }}
非推奨の price の代わりに使います。
例
{{ item.final_price | money }}
line_item.properties
プロパティ商品ページで入力された追加情報(名入れ文字など)です。
書き方
{% for p in item.properties %}
名前が _ で始まる項目は表示しない約束になっています。
例
{% for p in item.properties %}{% unless p.first contains '_' %}{{ p.first }}: {{ p.last }}{% endunless %}{% endfor %}
公式ドキュメント | 関連TIPS:ShopifyでShopify UI Elements Generatorで生成したLine item propertyをカスタマイズされたLiquidで設置した際、カートに情報が入らない場合の対応方法 | 目次へ戻る ↑
line_item.price
プロパティ非推奨明細の単価を返す古いプロパティです。
書き方
{{ item.price | money }}
非推奨です。自動割引やクーポンが反映されないため final_price を使います。
非推奨 代わりに:line_item.final_price
例
{{ item.final_price | money }}
instructions
オブジェクト入れ子になったカート明細(セット商品の中身など)の操作可否です。
書き方
{{ item.instructions.can_remove }}
例
{% if item.instructions.can_remove %}削除{% endif %}
プロパティ(2件・名前のみ。クリックで shopify.dev の説明へ)
parent_relationship
オブジェクト入れ子のカート明細の親子関係です。
書き方
{{ item.parent_relationship.parent }}
付属品など、他の商品に紐づく明細の判定に使います。
例
{% if item.parent_relationship %}付属品{% endif %}
プロパティ(1件・名前のみ。クリックで shopify.dev の説明へ)
order
オブジェクト注文1件の情報です。
書き方
{{ order.name }}
マイページの注文詳細や、通知メールのテンプレートで使います。
例
{{ order.name }} / {{ order.created_at | date: '%Y/%m/%d' }}
出力
#1001 / 2026/10/02
主要プロパティ(下に説明あり)
order.name order.financial_status_label order.fulfillment_status_label order.line_items
その他のプロパティ(40件・名前のみ。クリックで shopify.dev の説明へ)
discounts(非推奨) attributes cancel_reason cancel_reason_label cancelled cancelled_at cart_level_discount_applications created_at total_duties customer_url customer discount_applications total_discounts total_net_amount tax_price total_refunded_amount email financial_status fulfillment_status id metafields note confirmation_number order_number order_status_url customer_order_url phone shipping_address billing_address tags tax_lines transactions subtotal_line_items item_count shipping_methods line_items_subtotal_price subtotal_price total_price shipping_price pickup_in_store?
order.name
プロパティ注文番号(#1001 など)です。
書き方
{{ order.name }}
例
{{ order.name }}
出力
#1001
order.financial_status_label
プロパティ支払い状況を表示用の文言で返します。
書き方
{{ order.financial_status_label }}
例
{{ order.financial_status_label }}
出力
支払い済み
order.fulfillment_status_label
プロパティ発送状況を表示用の文言で返します。
書き方
{{ order.fulfillment_status_label }}
例
{{ order.fulfillment_status_label }}
出力
発送済み
order.line_items
プロパティ注文の明細の配列です。
書き方
{% for item in order.line_items %}
例
{% for item in order.line_items %}{{ item.title }} × {{ item.quantity }}{% endfor %}
checkout
オブジェクト非推奨チェックアウト(購入手続き)の情報です。
書き方
{{ checkout.order_number }}
checkout.liquid のカスタマイズ廃止に伴い、情報・配送・支払いページでは使えなくなっています。現在は Checkout Extensibility(チェックアウト用の拡張機能)でカスタマイズします。
非推奨 代わりに:Liquid での代わりは無し。チェックアウトのカスタマイズは Checkout Extensibility(チェックアウトUI拡張機能)で行う
例
{% # 新しいテーマでは使わない %}
プロパティ(39件・名前のみ。クリックで shopify.dev の説明へ)
applied_gift_cards attributes billing_address buyer_accepts_marketing cancelled(非推奨) cart_level_discount_applications currency customer discount(非推奨) discounts(非推奨) discount_applications discounts_amount discounts_savings email financial_status(非推奨) fulfilled_at(非推奨) fulfilled_line_items(非推奨) fulfillment_status(非推奨) gift_cards_amount id line_items line_items_subtotal_price name note order order_id order_name order_number requires_shipping shipping_address shipping_method shipping_price tax_lines tax_price total_price transactions unavailable_line_items(非推奨) unfulfilled_line_items(非推奨) item_count
discount
オブジェクト非推奨割引の情報を表す古いオブジェクトです。
書き方
{{ discount.title }}
非推奨です。すべての割引の種類を表せないため、discount_application と discount_allocation を使います。
非推奨 代わりに:discount_application、discount_allocation
例
{% for d in cart.discount_applications %}{{ d.title }}{% endfor %}
プロパティ(7件・名前のみ。クリックで shopify.dev の説明へ)
discount_application
オブジェクトカートや注文に適用された割引そのもの(クーポン・自動割引)の情報です。
書き方
{{ application.title }}
例
{% for d in cart.discount_applications %}{{ d.title }}: -{{ d.total_allocated_amount | money }}{% endfor %}
プロパティ(7件・名前のみ。クリックで shopify.dev の説明へ)
total_allocated_amount title value target_selection type value_type target_type
discount_allocation
オブジェクト割引が各明細にいくら割り振られたかの情報です。
書き方
{{ allocation.amount | money }}
例
{% for a in item.line_level_discount_allocations %}{{ a.discount_application.title }} -{{ a.amount | money }}{% endfor %}
プロパティ(2件・名前のみ。クリックで shopify.dev の説明へ)
transaction
オブジェクト注文の決済1件分の情報です。
書き方
{{ transaction.gateway }}
例
{% for t in order.transactions %}{{ t.gateway }} {{ t.amount | money }}{% endfor %}
プロパティ(14件・名前のみ。クリックで shopify.dev の説明へ)
id name status created_at receipt kind gateway status_label payment_details amount gateway_display_name show_buyer_pending_payment_instructions? buyer_pending_payment_notice buyer_pending_payment_instructions
transaction_payment_details
オブジェクト決済に使われたカードの種類・下4桁などの情報です。
書き方
{{ details.credit_card_company }}
例
{{ transaction.payment_details.credit_card_company }}
プロパティ(4件・名前のみ。クリックで shopify.dev の説明へ)
credit_card_company credit_card_last_four_digits credit_card_number gift_card
fulfillment
オブジェクト発送(フルフィルメント)の情報と追跡番号です。
書き方
{{ fulfillment.tracking_number }}
例
{% if line_item.fulfillment %}{{ line_item.fulfillment.tracking_url }}{% endif %}
プロパティ(7件・名前のみ。クリックで shopify.dev の説明へ)
created_at item_count fulfillment_line_items tracking_company tracking_numbers tracking_number tracking_url
shipping_method
オブジェクト注文で選ばれた配送方法の情報です。
書き方
{{ method.title }}
price は非推奨のため、割引後の金額は price_with_discounts を使います。
例
{% for m in order.shipping_methods %}{{ m.title }}{% endfor %}
プロパティ(8件・名前のみ。クリックで shopify.dev の説明へ)
title original_price price_with_discounts price(非推奨) handle id tax_lines discount_allocations
tax_line
オブジェクト税金の内訳1行分です。
書き方
{{ tax.title }}
例
{% for tax in order.tax_lines %}{{ tax.title }} {{ tax.price | money }}{% endfor %}
プロパティ(4件・名前のみ。クリックで shopify.dev の説明へ)
gift_card
オブジェクトギフトカードの情報(残高・コード・有効期限)です。
書き方
{{ gift_card.balance | money }}
ギフトカードのテンプレートで使います。
例
残高: {{ gift_card.balance | money }}
プロパティ(19件・名前のみ。クリックで shopify.dev の説明へ)
balance code currency customer recipient message send_on enabled expired expires_on initial_value url template_suffix properties qr_identifier pass_url product variant last_four_characters
recipient
オブジェクトギフトカードの受取人の情報です。
書き方
{{ gift_card.recipient.name }}
例
{{ gift_card.recipient.nickname }}様へ
money
オブジェクト金額と通貨をセットで表すオブジェクトです。
書き方
{{ money | money }}
money 型メタフィールドの値もこれで届きます。
例
{{ product.metafields.custom.deposit.value | money }}
プロパティ(1件・名前のみ。クリックで shopify.dev の説明へ)
pending_payment_instruction_input
オブジェクト後払い・振込など、支払い待ちの注文の支払い案内の項目です。
書き方
{{ input.header }}
例
{{ input.header }}: {{ input.value }}
scripts
オブジェクト廃止Shopify Scripts(Plus向けの割引スクリプト)の情報です。
書き方
{{ scripts.cart_calculate_line_items }}
Shopify Scripts は 2026年4月15日に編集・公開ができなくなり、2026年6月30日にすべてのスクリプトの実行が停止しました。割引・配送・決済のカスタマイズは Shopify Functions(またはアプリ)へ移行します。
廃止 代わりに:Shopify Functions(割引・配送・決済のカスタマイズ)またはアプリへ移行。2026年4月15日に編集・公開停止、2026年6月30日に実行停止
例
{% # 新規利用は不可。Functions に移行する %}
プロパティ(1件・名前のみ。クリックで shopify.dev の説明へ)
script
オブジェクト廃止Shopify Script 1つ分の情報です。
書き方
{{ script.name }}
scripts と同じく、2026年6月30日に実行が停止した Shopify Scripts の情報です。
廃止 代わりに:scripts と同じく Shopify Functions へ移行(2026年6月30日に実行停止)
例
{% # 新規利用は不可 %}
Shopify Liquid チートシートの記事
- チートシート索引
- 書き方の基本
- 基本タグ
- テーマタグ
- 文字列フィルター
- 配列・計算フィルター
- 金額・日付フィルター
- 画像・HTMLフィルター
- その他のフィルター
- 商品オブジェクト
- コレクション・カート・注文(この記事)
- 顧客・ブログ・メタフィールド
- グローバルオブジェクト
仕様の参照先:Shopify Liquid リファレンス(shopify.dev)。説明文とコード例は STORE DOJO の独自執筆です。出力例はストアのデータや設定によって変わります。仕様確認:2026年10月。