>> Udemyのセール!Shopify講座が1,500円から

【Shopify】Order Printerで使える変数まとめ【Liquid】

Shopify Order Printer 変数一覧 アプリ

Shopifyの明細書発行アプリ「Order Printer」で使える変数一覧が知りたい。
変数一覧がアプリの管理画面でしか見れなくて不便で困っている。

こんなことを考えている方へ。
この記事のポイントは以下です。

・Shopifyの明細書発行アプリ「Order Printer」で使える変数一覧(2022年10月時点)

Shopify飯店

Shopify飯店

🔽Shopifyを学びたい方へ👇
私はShopifyを独学しましたが、いま思えば効率が悪かったと思います。
自身の経験を踏まえて、おすすめの学習方法を以下の記事にまとめました。

Shopifyの学習方法まとめ

 

  1. 【Shopify】Order Printerで使える変数まとめ【Liquid】
    1. General variables(一般的な変数)
      1. Shop name
      2. Order number
      3. Order name (with # before number)
      4. Date
      5. Processed date
      6. Billing address
      7. Shipping address
      8. Shipping methods (collection of shipping lines)
      9. Shipping method
      10. Customer
      11. Email
      12. Financial status
      13. Fulfillment status
      14. Fulfillment service
      15. Discounts amount (collection of discount amounts)
      16. Discounts savings (collection of discount savings)
      17. Payment gateways
      18. Payment gateway
      19. Order Currency (currency code of order)
      20. Subtotal price
      21. Shipping price
      22. Total discounts
      23. Total tax
      24. Total price
      25. Total paid
      26. Transactions
      27. Order attributes
      28. Order note
    2. Shop details(ストアの詳細)
      1. Shop name
      2. Shop email
      3. Shop domain
      4. Shop owner
      5. Shop street address
      6. Shop street address line 2
      7. Shop city
      8. Shop province
      9. Shop province code
      10. Shop postal code / ZIP code
      11. Shop country name
      12. Shop country code
      13. Shop phone number
    3. Address details(住所の詳細)
      1. First name
      2. Last name
      3. Name
      4. Company
      5. Address 1
      6. Address 2
      7. Street
      8. City
      9. Province
      10. Province code
      11. Postal code / ZIP code
      12. Country
      13. Country code
      14. Phone number
    4. Customer details(お客様の詳細)
      1. Name
      2. Email
      3. Orders count
      4. Default Address
    5. Discount details(ディスカウントの詳細)
      1. Order discounts
      2. Code
      3. Amount
      4. Savings
    6. Line item details(注文商品の配列の詳細)
      1. Line items
      2. Fulfilled line items
      3. Unfulfilled line items
      4. Name
      5. Title
      6. Product title
      7. Quantity
      8. Fulfillable Quantity
      9. Price
      10. Line price
      11. Original price
      12. Total Discount
      13. Weight
      14. Weight with unit
      15. SKU
      16. Vendor
      17. Fulfillment
      18. Product
      19. Variant
      20. Image
    7. Refund details(返金の詳細)
      1. Refunds
      2. Note
      3. Restock
      4. Refund transactions
      5. Refund line items
      6. Refund line item quantity
      7. Refund line item
    8. Transaction details(注文の詳細)
      1. Payment transactions
      2. Refund transactions
      3. Amount
      4. Authorization
      5. Date
      6. Gateway
      7. Payment method (eg: bank transfer, credit card)
      8. Kind (eg: authorization, capture, refund)
      9. Message
      10. Status
    9. Shipping line details(送料の配列の詳細)
      1. Shipping lines
      2. Title
      3. Price
    10. Tax line details(税金・消費税の配列の詳細)
      1. Tax lines
      2. Title
      3. Rate
      4. Price
      5. Fulfillment details(配送の詳細)
      6. Fulfillments
      7. Date
      8. Tracking number
      9. Tracking company
      10. Product details(商品の詳細)
      11. Title
      12. Price
      13. Content
      14. Description
      15. Handle
      16. Option names
      17. Tags
      18. Type
      19. Vendor
      20. URL (eg: /products/product-handle)
      21. Featured image (first image)
      22. Images
      23. Variants
    11. Variant details(商品バリエーションの詳細)
      1. Title
      2. Price
      3. Compare at price
      4. Weight
      5. Weight with unit
      6. Inventory quantity
      7. SKU
      8. Barcode
      9. Option 1
      10. Option 2
      11. Option 3
      12. Image
    12. Filters(フィルターの詳細)
      1. File URL
      2. Asset URL
      3. Script tag
      4. Stylesheet tag
      5. Image tag
      6. Image URL
      7. Money format
      8. Money format with currency
      9. Money format without currency
      10. Money format without decimals
  2. Order Printerにメタフィールドの値を出力したい場合
  3. Order Printerの変数を調べるときに参考になるサイト
  4. 参考:Shopifyを学ぶ方法まとめ|本・動画教材・オンラインスクール
  5. まとめ
スポンサーリンク

【Shopify】Order Printerで使える変数まとめ【Liquid】

Shopify Order Printer 変数一覧

Shopifyの明細書発行アプリ「Order Printer」で使える変数の一覧を紹介します。

変数一覧はアプリの管理画面でしか見れないので不便です。そこで、自分用にLiquidの変数を一覧にまとめました。

 

General variables(一般的な変数)

General variables(一般的な変数)の項目には、注文に関連する一般的なすべての変数が掲載されています。

 

Shop name

ストア名。

{{ shop_name }}

 

Order number

注文番号。

{{ order_number }}

 

Order name (with # before number)

数字の左側に「#」が付いた注文番号。

{{ order_name }}

もしくは、

{{ name }}

 

Date

Shopifyで注文が作成された時の自動生成された日時(ISO 8601形式)です。

{{ date }}

もしくは、

{{ created_at }}

 

Processed date

注文がインポートされた日付と時間。

{{ processed_at }}

 

Billing address

注文者の請求先住所。

{{ billing_address | format_address }}

 

Shipping address

注文者の配送先住所。

{{ shipping_address | format_address }}

 

Shipping methods (collection of shipping lines)

配送手段。

{{ shipping_methods }}

もしくは、

{{ shipping_lines }}

 

Shipping method

配送手段の名前。

{{ shipping_method.title }}

もしくは、

{{ shipping_line.title }}

 

Customer

顧客。

{{ customer }}

 

Email

メールアドレス。

{{ email }}

 

Financial status

注文に関連する支払いの状況。

{{ financial_status }}

 

Fulfillment status

注文がどの程度まで進んでいるのか、項目が満たされているか。返す値は、null、fulfilled、partial、not_eligible。

{{ fulfillment_status }}

 

Fulfillment service

商品を提供するサービスプロバイダ。返す値は、manual、またはamazonやshipwireのようなプロバイダの名前。

{{ fulfillment_service }}

 

Discounts amount (collection of discount amounts)

{{ discounts_amount }}

 

Discounts savings (collection of discount savings)

{{ discounts_savings }}

 

Payment gateways

{{ gateways }}

 

Payment gateway

shopify_paymentsなどの決済ゲートウェイ。

{{ gateway }}

 

Order Currency (currency code of order)

ショップの通貨を表す3文字のコード(ISO 4217形式)。

{{ order_currency }}

もしくは、

{{ currency }}

 

Subtotal price

ショップ通貨での注文の現在の小計価格です。このフィールドの値には、注文の編集、返品、返金が反映されます。

{{ subtotal_price | money }}

 

Shipping price

送料金額。

{{ shipping_price | money }}

 

Total discounts

合計割引金額。

{{ total_discounts | money }}

 

Total tax

合計の税額(消費税額)。

{{ total_tax | money }}

もしくは、

{{ tax_price | money }}

 

Total price

合計金額。

{{ total_price | money }}

 

Total paid

合計支払金金額。

{{ total_paid | money }}

 

Transactions

{{ transactions }}

 

Order attributes

注文の属性。

{{ attributes }}

 

Order note

カート画面の備考欄に記載された「カートメモ」。カスタマイズしてこれを出力させるケースが多いです。

{{ note }}

 

Shop details(ストアの詳細)

Shop details(ストアの詳細)には、ストアの名前や住所などの変数が掲載されています。

 

Shop name

ストアの名称。

{{ shop.name }}

 

Shop email

ストアのメールアドレス。

{{ shop.email }}

 

Shop domain

ストアのドメイン。

{{ shop.domain }}

 

Shop owner

ストアのオーナー。

{{ shop.owner }}

 

Shop street address

ストアの住所1。

{{ shop.address }}

 

Shop street address line 2

ストアの住所2。

{{ shop.address2 }}

 

Shop city

ストア住所の市区町村。

{{ shop.city }}

 

Shop province

ストア住所の都道府県。

{{ shop.province }}

 

Shop province code

ストア住所の都道府県コード。

{{ shop.province_code }}

 

Shop postal code / ZIP code

ストア住所の郵便番号。

{{ shop.zip }}

 

Shop country name

ストア住所の国。

{{ shop.country }}

 

Shop country code

ストア住所の国コード。

{{ shop.country_code }}

 

Shop phone number

ストアの電話番号。

{{ shop.phone }}

 

Address details(住所の詳細)

Address details(住所の詳細)には、注文に関わる住所の変数が掲載されています。

「shipping_address」「billing_address」「customer.default_address」を指定することで、どの住所を使用するかを選択することができます。

 

First name

お届け先の人の名前。

{{ shipping_address.first_name }}

 

Last name

お届け先の人の苗字。

{{ shipping_address.last_name }}

 

Name

お届け先の人のフルネーム。

{{ shipping_address.name }}

 

Company

お届け先の会社名。

{{ shipping_address.company }}

 

Address 1

お届け先の住所1。

{{ shipping_address.address1 }}

 

Address 2

お届け先の住所2。

{{ shipping_address.address2 }}

 

Street

お届け先の住所1と住所2の合計値。

{{ shipping_address.street }}

 

City

お届け先の市区町村。

{{ shipping_address.city }}

 

Province

お届け先の都道府県。

{{ shipping_address.province }}

 

Province code

お届け先の都道府県コード。

{{ shipping_address.province_code }}

 

Postal code / ZIP code

お届け先の郵便番号。

{{ shipping_address.zip }}

 

Country

お届け先の国。

{{ shipping_address.country }}

 

Country code

お届け先の国コード。

{{ shipping_address.country_code }}

 

Phone number

お届け先の電話番号。

{{ shipping_address.phone }}

 

Customer details(お客様の詳細)

Customer details(お客様の詳細)には、お客様の氏名やメールアドレスなどの変数が掲載されています。

 

Name

顧客のフルネーム。

{{ customer.name }}

 

Email

顧客のフルネーム。

{{ customer.email }}

 

Orders count

この顧客に関連する注文の数。

{{ customer.orders_count }}

 

Default Address

顧客が設定しているデフォルト住所。

{{ customer.default_address }}

 

Discount details(ディスカウントの詳細)

Discount details(ディスカウントの詳細)には、注文時のディスカウント(割引)に関わる変数が記載されています。

 

Order discounts

{% for discount in discounts %}
...
{% endfor %}

 

Code

{{ discount.code }}

もしくは、

{{ discount.title }}

 

Amount

{{ discount.amount }}

 

Savings

{{ discount.savings }}

 

Line item details(注文商品の配列の詳細)

Line item details(注文商品の配列の詳細)の変数を使うと、お客さんが注文した商品を配列で表示することができます。

 

Line items

お客さんが注文した商品を配列で表示するための記述。

{% for line_item in line_items %}
...
{% endfor %}

 

Fulfilled line items

{% for line_item in fulfilled_line_items %}
...
{% endfor %}

 

Unfulfilled line items

{% for line_item in unfulfilled_line_items %}
...
{% endfor %}

 

Name

{{ line_item.name }}

 

Title

{{ line_item.title }}

 

Product title

{{ line_item.product_title }}

 

Quantity

{{ line_item.quantity }}

 

Fulfillable Quantity

{{ line_item.fulfillable_quantity }}

 

Price

{{ line_item.price | money }}

 

Line price

{{ line_item.line_price | money }}

 

Original price

{{ line_item.original_price | money }}

 

Total Discount

{{ line_item.total_discount | money }}

 

Weight

{{ line_item.weight }}

もしくは、

{{ line_item.grams }}

 

Weight with unit

{{ line_item.weight | weight_with_unit }}

 

SKU

{{ line_item.sku }}

 

Vendor

{{ line_item.vendor }}

 

Fulfillment

{{ line_item.fulfillment }}

 

Product

{{ line_item.product }}

 

Variant

{{ line_item.variant }}

 

Image

{{ line_item.image }}
{{ line_item.image | img_url: 'thumb' | img_tag }}
{{ line_item | img_url: 'thumb' | img_tag }}

 

Refund details(返金の詳細)

Refund details(返金の詳細)では、注文の返金に関する変数が掲載されています。

 

Refunds

{% for refund in refunds %}
...
{% endfor %}

 

Note

{{ refund.note }}

 

Restock

{{ refund.restock }}

 

Refund transactions

{% for refund_transaction in refund.transactions %}
...
{% endfor %}

 

Refund line items

{% for refund_line_item in refund.refund_line_items %}
...
{% endfor %}

 

Refund line item quantity

{{ refund_line_item.quantity }}

 

Refund line item

{{ refund_line_item.line_item }}

 

Transaction details(注文の詳細)

Transaction details(注文の詳細)では、注文金額や注文ステータスなど注文自体に関わる変数が掲載されています。

 

Transactions

{% for transaction in transactions %}

{% endfor %}

 

Payment transactions

{% for transaction in payment_transactions %}
...
{% endfor %}

 

Refund transactions

{% for transaction in refund_transactions %}
...
{% endfor %}

 

Amount

{{ transaction.amount | money }}

 

Authorization

{{ transaction.authorization }}

 

Date

{{ transaction.date }}

もしくは、

{{ transaction.created_at }}

 

Gateway

{{ transaction.gateway }}

 

Payment method (eg: bank transfer, credit card)

{{ transaction.gateway | payment_method }}

 

Kind (eg: authorization, capture, refund)

{{ transaction.kind }}

 

Message

{{ transaction.message }}

 

Status

{{ transaction.status }}

 

Shipping line details(送料の配列の詳細)

Shipping line details(送料の配列の詳細)の変数を使うと、送料名や送料金額を配列で出力することができます。

 

Shipping lines

{% for shipping_line in shipping_lines %}
...
{% endfor %}

 

Title

{{ shipping_line.title }}

 

Price

{{ shipping_line.price | money }}

 

Tax line details(税金・消費税の配列の詳細)

Tax line details(税金・消費税の配列の詳細)の変数を使うと、税(消費税)のレートや金額を配列で出力することができます。

 

Tax lines

{% for tax_line in tax_lines %}
...
{% endfor %}

 

Title

{{ tax_line.title }}

 

Rate

{{ tax_line.rate }}

 

Price

{{ tax_line.price | money }}

 

Fulfillment details(配送の詳細)

Fulfillment details(配送の詳細)には、配送会社や追跡番号の変数が掲載されています。

 

Fulfillments

{% for fulfillment in fulfillments %}
...
{% endfor %}

 

Date

{{ fulfillment.date }} or {{ fulfillment.created_at }}

 

Tracking number

{{ fulfillment.tracking_number }}

 

Tracking company

{{ fulfillment.tracking_company }}

 

Product details(商品の詳細)

Product details(商品の詳細)には、商品に関わるあらゆる情報の変数が掲載されています。

 

Title

{{ product.title }}

 

Price

{{ product.price | money }}

 

Content

{{ product.content }}

 

Description

{{ product.description }}

 

Handle

{{ product.handle }}

 

Option names

{{ product.options }}

 

Tags

{{ product.tags }}

 

Type

{{ product.type }}

 

Vendor

{{ product.vendor }}

 

URL (eg: /products/product-handle)

{{ product.url }}

 

Featured image (first image)

{{ product.featured_image | img_url: 'large' | img_tag }}

 

Images

{{ product.images }}

 

Variants

{{ product.variants }}

 

Variant details(商品バリエーションの詳細)

Variant details(商品バリエーションの詳細)では、商品展開(S、M、Lなどのサイズ展開など)に関わる変数が掲載されています。

 

Title

{{ variant.title }}

 

Price

{{ variant.price | money }}

 

Compare at price

{{ variant.compare_at_price | money }}

 

Weight

{{ variant.weight }}

もしくは、

{{ variant.grams }}

 

Weight with unit

{{ variant.weight | weight_with_unit }}

 

Inventory quantity

{{ variant.inventory_quantity }}

 

SKU

{{ variant.sku }}

 

Barcode

{{ variant.barcode }}

 

Option 1

{{ variant.option1 }}

 

Option 2

{{ variant.option2 }}

 

Option 3

{{ variant.option3 }}

 

Image

{{ variant.image }}
{{ variant.image | img_url: 'thumb' | img_tag }}
{{ variant | img_url: 'thumb' | img_tag }}

 

Filters(フィルターの詳細)

Filters(フィルターの詳細)には、使用可能なLiquidのフィルターが掲載されています。

 

File URL

{{ 'file.txt' | files_url }}

 

Asset URL

{{ 'style.css' | asset_url }}

 

Script tag

{{ 'script.js' | asset_url | script_tag }}

 

Stylesheet tag

{{ 'style.css' | asset_url | stylesheet_tag }}

 

Image tag

{{ 'example.png' | img_tag }}

 

Image URL

{{ product.featured_image | img_url: 'large' | img_tag }}

 

Money format

{{ product.price | money }}

 

Money format with currency

{{ product.price | money_with_currency }}

 

Money format without currency

{{ product.price | money_without_currency }}

 

Money format without decimals

{{ product.price | money_no_decimals }}

 

スポンサーリンク

Order Printerにメタフィールドの値を出力したい場合

公式の変数一覧には載っていませんが、Order Printerにメタフィールドの値を出力することができます。

詳しくは以下の記事で解説しています。

【関連記事はこちら】
【Shopify】メタフィールドをOrder Printerに出力する方法 を合わせて読む

 

スポンサーリンク

Order Printerの変数を調べるときに参考になるサイト

Order Printerの変数を調べるときに参考になるサイトを紹介します。

・Windsor.ai Documentation – Shopify Field Reference
Shopify
Windsor.ai Shopify Data Connector Integration
・【Shopify.dev和訳】Storefront API/Reference/Orders
【Shopify.dev和訳】Storefront API/Reference/Orders

 

スポンサーリンク

参考:Shopifyを学ぶ方法まとめ|本・動画教材・オンラインスクール

Shopify飯店

Shopifyを本格的に学ぶためにはネットの情報だけは足りません。本(参考書)、動画教材(Udemy)、オンラインスクールを活用して、効果的に学習しましょう。

思い切って有料の教材を買って体系的に学ぶことで、操作に悩む時間が減りますし、より高度なカスタマイズや提案ができるようになり、仕事の幅が広がります。

仕事でShopifyを扱っている筆者が、おすすめの学習教材をまとめました。くわしくは以下の記事をご覧ください。

【関連記事】【2023年最新】Shopifyのおすすめ学習方法まとめ【現役エンジニアが紹介】

Shopifyのおすすめ学習方法まとめ【現役エンジニアが紹介】
現役フリーランスエンジニアがShopifyの勉強方法をまとめました。オンラインスクールで学ぶ、本で学ぶ、Udemyで学ぶ、公式のYoutubeで学ぶの4つです。おすすめはオンラインスクールで学ぶことです。

【関連記事】【2023年最新】デイトラShopifyコースは買うべき?【レビュー】
※2コース目以降の追加受講は5000円引き!

デイトラShopifyコースは買うべきか?徹底レビュー【2023年最新】
デイトラShopifyコースを大解剖します。内容、強み、評判、身につくスキルをShopify構築を仕事にしている筆者が解説します。

【関連記事】【2023年最新】Shopifyの学習におすすめの動画教材(Udemy)まとめ

【日本語のみ】Shopifyの学習に最適なUdemyの教材まとめ
日本語で受講できるUdemyのShopify講座をまとめました。新講座が出るたびに随時、記事を更新します。初心者向けの講座から上級者向けの講座まで紹介しています。また、筆者が実際にUdemyの講座を受講したレビューも紹介しています。

【関連記事】【2023年最新】Shopifyの学習におすすめの本まとめ

Shopifyの学習におすすめの本まとめ【参考書7選を紹介】
本記事ではShopifyを学ぶのにオススメな本・参考書をまとめています。

【関連記事】【2023年最新】【Shopifyの独学】勉強方法のまとめ【初心者向け】

【Shopifyの独学】勉強方法のまとめ【初心者向け】
本記事ではShopifyの独学方法をロードマップとしてまとめています。筆者はShopifyを独学して3年ほど経ちました。ノウハウが溜まってきたので、Shopify独学のロードマップを整理して記事にしました。
【Udemyで初めて買う場合はお得!】
初回購入ならShopifyの動画教材が安く買える!
Udemyはほとんど常に、初回購入者向けのセールを開催しています。通常1万〜2万円の商品が初回購入だと2,000円程度で購入できます。
・Udemyでセール中のShopifyの講座一覧をまとめて見る icon

 

スポンサーリンク

まとめ

本記事では、Shopifyの明細書発行アプリ「Order Printer」で使える変数の一覧をまとめました。変数一覧はアプリの管理画面からしか見れないので不便なんですよね。

本記事は2022年10月時点の情報をもとに作成しています。Shopifyおよびアプリのアップデートによって、今後使える変数が変わる可能性があります。

今回の記事はここまでです。

タイトルとURLをコピーしました