Liquid Snippets by ALSEL
📘 公式リファレンス📦 リファレンス/オブジェクト初級

order オブジェクト

注文の詳細情報を取得するオブジェクト。注文番号、顧客情報、商品、金額、配送状態などすべての注文データを参照できる。

用途
顧客アカウントページで過去注文の詳細を表示したり、注文完了ページで購入内容を確認画面として表示するとき。
設置場所
Liquid 内で `{{ order.property }}` の形で参照する。主に `customers/order` テンプレートや `checkout` オブジェクト内、`customer` オブジェクトの orders 配列で利用可能。
注意点
`order.discounts` は廃止予定のため、割引情報の取得には `order.discount_applications` を使用する。キャンセル日時 `cancelled_at` は `date` フィルターでフォーマットが必要。金額プロパティ(`total_price` など)は顧客の通貨単位で出力されるため、`money` フィルターで通貨記号付きに整形する。
タグ:ordercustomer-accountcheckoutreference

仕様

846 行 / json
{
  "access": {
    "global": false,
    "parents": [
      {
        "object": "checkout",
        "property": "order"
      },
      {
        "object": "customer",
        "property": "last_order"
      },
      {
        "object": "customer",
        "property": "orders"
      }
    ],
    "template": [
      "customers/order"
    ]
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "",
  "properties": [
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because not all discount types and details are captured.\n\nThe `order.discounts` property has been replaced by [`order.discount_applications`](/docs/api/liquid/objects/order#order-discount_applications).",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "discount",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The discounts on the order.",
      "name": "discounts"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "If there are no attributes on the order, then `nil` is returned.\n> Tip:\n> Attributes are [collected with the cart](https://shopify.dev/themes/architecture/templates/cart#support-cart-notes-and-attributes).",
      "examples": [
        {
          "name": "Output the attributes",
          "description": "```liquid\n<ul>\n  {% for attribute in order.attributes -%}\n    <li><strong>{{ attribute.first }}:</strong> {{ attribute.last }}</li>\n  {%- endfor %}\n</ul>\n```\n",
          "syntax": "",
          "path": "/",
          "raw_liquid": "",
          "parameter": false,
          "display_type": "text",
          "show_data_tab": true
        }
      ],
      "return_type": [
        {
          "type": "untyped",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The attributes on the order.",
      "name": "attributes"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "customer",
          "description": "Customer changed/cancelled order",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "declined",
          "description": "Payment declined",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "fraud",
          "description": "Fraudulent order",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "inventory",
          "description": "Items unavailable",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "staff",
          "description": "Staff error",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "other",
          "description": "Other",
          "array_value": ""
        }
      ],
      "summary": "The reason that the order was cancelled.",
      "name": "cancel_reason"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use this property to output the cancellation reason on the storefront.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The localized version of the [cancellation reason](/docs/api/liquid/objects/order#order-cancel_reason) for the order.",
      "name": "cancel_reason_label"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the order was cancelled. Returns `false` if not.",
      "name": "cancelled"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use the [`date` filter](/docs/api/liquid/filters/date) to format the timestamp.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A timestamp for when the order was cancelled.",
      "name": "cancelled_at"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount_application"
        }
      ],
      "summary": "The discount applications that apply at the order level.",
      "name": "cart_level_discount_applications"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use the [`date` filter](/docs/api/liquid/filters/date) to format the timestamp.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A timestamp for when the order was created.",
      "name": "created_at"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "If there are no duties, then `nil` is returned. The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The sum of all duties applied to the line items in the order in the currency's subunit.",
      "name": "total_duties"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The URL for the customer to view the order in their account.",
      "name": "customer_url"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "customer",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The customer that placed the order.",
      "name": "customer"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount_application"
        }
      ],
      "summary": "All of the discount applications for the order and its line items.",
      "name": "discount_applications"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The total amount of all discounts applied to the order in the currency's subunit.",
      "name": "total_discounts"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The amount is calculated after refunds are applied, so is equal to `order.total_price` minus `order.total_refunded_amount`.\n\nThe value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The net amount of the order in the currency's subunit.",
      "name": "total_net_amount"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The total amount of taxes applied to the order in the currency's subunit.",
      "name": "tax_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The total amount that's been refunded from the order in the currency's subunit.",
      "name": "total_refunded_amount"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "If no email is associated with the order, then `nil` is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The email that's associated with the order.",
      "name": "email"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "authorized",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "expired",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "paid",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "partially_paid",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "partially_refunded",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "pending",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "refunded",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "unpaid",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "voided",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The order's financial status.",
      "name": "financial_status"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use this property to output the financial status on the storefront.",
      "examples": [],
      "return_type": [],
      "summary": "The localized version of the [financial status](/docs/api/liquid/objects/order#order-financial_status) of the order.",
      "name": "financial_status_label"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The fulfillment status of the order.",
      "name": "fulfillment_status"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use this property to output the fulfillment status on the storefront.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "complete",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "fulfilled",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "partial",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "restocked",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "unfulfilled",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The localized version of the [fulfillment status](/docs/api/liquid/objects/order#order-fulfillment_status) of the order.",
      "name": "fulfillment_status_label"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The ID of the order.",
      "name": "id"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> To learn about how to create metafields, refer to [Create and manage metafields](/apps/metafields/manage) or visit\n> the [Shopify Help Center](https://help.shopify.com/manual/metafields).",
      "examples": [],
      "return_type": [
        {
          "type": "untyped",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [metafields](/docs/api/liquid/objects/metafield) applied to the order.",
      "name": "metafields"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The name of the order.",
      "name": "name"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "If there's no note on the order, then `nil` is returned.\n> Tip:\n> Notes are [collected with the cart](https://shopify.dev/themes/architecture/templates/cart#support-cart-notes-and-attributes).",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The note on the order.",
      "name": "note"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A randomly generated alpha-numeric identifier for the order that may be shown to the customer\ninstead of the sequential order name. For example, \"XPAV284CT\", \"R50KELTJP\" or \"35PKUN0UJ\".\nThis value isn't guaranteed to be unique.",
      "name": "confirmation_number"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The integer representation of the order [name](/docs/api/liquid/objects/order#order-name).",
      "name": "order_number"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The URL for the [**Order status** page](https://help.shopify.com/manual/orders/status-tracking) for the order.",
      "name": "order_status_url"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "Customer accounts includes a list of Buyers Orders and an Order Details View.\nThis liquid function exposes a URL to a specific Orders Details in customer accounts.\n[Setup process for the new order details page](https://help.shopify.com/en/manual/customers/customer-accounts/new-customer-accounts)\ncan be found in the help center.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The URL for the new order details page.",
      "name": "customer_order_url"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The phone number associated with the order.",
      "name": "phone"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "address",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The shipping address of the order.",
      "name": "shipping_address"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "address",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The billing address of the order.",
      "name": "billing_address"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The tags are returned in alphabetical order.",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "string"
        }
      ],
      "summary": "The [tags](https://help.shopify.com/manual/shopify-admin/productivity-tools/using-tags) on the order.",
      "name": "tags"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "tax_line"
        }
      ],
      "summary": "The tax lines on the order.",
      "name": "tax_lines"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "transaction"
        }
      ],
      "summary": "The transactions of the order.",
      "name": "transactions"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The line items in the order.",
      "name": "line_items"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\n> These line items are used to calculate the the [subtotal price](/docs/api/liquid/objects/order#order-subtotal_price).",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The non-tip line items in the order.",
      "name": "subtotal_line_items"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The number of items in the order.",
      "name": "item_count"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "shipping_method"
        }
      ],
      "summary": "The shipping methods for the order.",
      "name": "shipping_methods"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The sum of the prices of all of the line items in the order in the currency's subunit, after any line item discounts have\nbeen applied.",
      "name": "line_items_subtotal_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The sum of the prices of the [subtotal line items](/docs/api/liquid/objects/order#order-subtotal_line_items) in the currency's subunit, after any line item or\ncart discounts have been applied.",
      "name": "subtotal_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\n> The total price is calculated before refunds are applied. Use [`order.total_net_amount`](/docs/api/liquid/objects/order#order-total_net_amount)\n> to output the total minus any refunds.\n\nThe value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The total price of the order in the currency's subunit.",
      "name": "total_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The shipping price of the order in the currency's subunit.",
      "name": "shipping_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the order is a store pickup order.",
      "name": "pickup_in_store?"
    }
  ],
  "summary": "An [order](https://help.shopify.com/manual/orders).",
  "name": "order",
  "examples": [],
  "json_data": {
    "path": "/",
    "handle": "customer.orders[4]",
    "data_from_file": ""
  },
  "return_type": []
}

出典・ライセンス

License:
MIT

このコードは Shopify 著作の MIT ライセンスソースです。 原本の著作権は Shopify が保有します。日本語訳は ALSEL によるものです。

関連項目

📘 公式リファレンス📦 リファレンス/オブジェクト初級

content_for_header オブジェクト

Shopify が必要とするスクリプト(分析・チェックアウト・言語設定など)をすべて動的に出力するオブジェクト。theme.liquid の <head> タグ内に埋め込む必須要素。

📁 theme-liquid-docs·MIT·20
📘 公式リファレンス📦 リファレンス/オブジェクト中級

metaobjects オブジェクト

ストア全体のメタオブジェクト定義にアクセスするグローバルオブジェクト。個別のメタオブジェクトはタイプとハンドルで参照でき、メタオブジェクト定義のエントリをループで反復処理できる。

📁 theme-liquid-docs·MIT·20
📘 公式リファレンス📦 リファレンス/オブジェクト初級

additional_checkout_buttons オブジェクト

PayPal Express Checkout など、オフサイト決済に対応した外部決済プロバイダーがストアに設定されているかを真偽値で返す。`content_for_additional_checkout_buttons` と組み合わせて、該当するチェックアウトボタンを条件付きで表示する。

📁 theme-liquid-docs·MIT·27
📘 公式リファレンス📦 リファレンス/オブジェクト初級

canonical_url オブジェクト

現在のページの正規 URL を取得するオブジェクト。Google などの検索エンジンに対してどのページ版が正規であるかを指定するために使用する。

📁 theme-liquid-docs·MIT·27
📘 公式リファレンス📦 リファレンス/オブジェクト初級

content_for_index オブジェクト

ホームページに表示するセクションの内容を動的に返すオブジェクト。Liquid インデックステンプレートで必ず使用する。

📁 theme-liquid-docs·MIT·27
📘 公式リファレンス📦 リファレンス/オブジェクト初級

content_for_additional_checkout_buttons オブジェクト

PayPal、Apple Pay、Google Pay など複数の決済プロバイダが有効になっているとき、その決済ボタンを HTML として出力するオブジェクト。`additional_checkout_buttons` で有無を判定したうえで、このオブジェクトで実際のボタンを表示する。

📁 theme-liquid-docs·MIT·27