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

checkout オブジェクト

チェックアウトページと注文ステータスページで利用可能なオブジェクト。顧客情報、住所、適用済みギフトカード、割引情報などチェックアウト関連のデータにアクセスできる。

用途
注文ステータスページのカスタマイズ時に顧客の注文内容や配送先住所を表示する。Shopify Plus マーチャントが checkout.liquid をカスタマイズする際に、チェックアウトプロセス中の情報を参照する。
設置場所
templates/order.liquid または Shopify Plus の checkout.liquid 内で `{{ checkout.property_name }}` の形で直接参照する。例えば `{{ checkout.customer.email }}`、`{{ checkout.billing_address.city }}`、`{{ checkout.currency }}` など。
注意点
checkout オブジェクトは Information、Shipping、Payment ページから2024年8月13日廃止予定。これらページをカスタマイズしている場合は Checkout Extensibility への移行が必須。order.liquid での使用は継続対応される。`checkout.cancelled` と `checkout.discount` は廃止済みのため使用しない。`checkout.discounts` も廃止予定であり、代わりに `checkout.discount_applications` または `checkout.cart_level_discount_applications` を使用する。
タグ:checkoutordercustomergift-carddiscountaddress

仕様

647 行 / json
{
  "access": {
    "global": false,
    "parents": [],
    "template": [
      "checkout"
    ]
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "> Deprecated:\n> <p>The <code>checkout</code> object will be deprecated for the Information, Shipping, and Payment pages on August 13, 2024. Merchants who have customized these pages using <code>checkout.liquid</code> need to <a href=\"https://help.shopify.com/manual/online-store/themes/theme-structure/extend/checkout-migration#migrate-to-checkout-extensibility\">upgrade to Checkout Extensibility</a> before August 13, 2024.</p>\n> <p>Learn <a href=\"/apps/checkout\">how to build checkout extensions</a> that extend the functionality of Shopify checkout.</p>\n\nYou can access the `checkout` object on the [**Order status** page](https://help.shopify.com/manual/orders/status-tracking/customize-order-status).\n\nShopify Plus merchants can access the `checkout` object in the [`checkout.liquid` layout](/themes/architecture/layouts/checkout-liquid).",
  "properties": [
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "gift_card"
        }
      ],
      "summary": "The gift cards applied to the checkout.",
      "name": "applied_gift_cards"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "Shopify Plus merchants that have access to `checkout.liquid` can [capture attributes at checkout](/themes/architecture/layouts/checkout-liquid#capture-checkout-attributes).",
      "examples": [],
      "return_type": [
        {
          "type": "untyped",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Additional attributes entered by the customer with the [cart](/docs/api/liquid/objects/cart#cart-attributes).",
      "name": "attributes"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "address",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The billing address entered at checkout.",
      "name": "billing_address"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the customer checks the email marketing subscription checkbox. Returns `false` if not.",
      "name": "buyer_accepts_marketing"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because `false` is always returned.",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the checkout has been cancelled. Returns `false` if not.",
      "name": "cancelled"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount_application"
        }
      ],
      "summary": "The cart-specific discount applications for the checkout.",
      "name": "cart_level_discount_applications"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [ISO code](https://www.iso.org/iso-4217-currency-codes.html) of the currency of the checkout.",
      "name": "currency"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "customer",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The customer associated with the checkout.\n> Note:\n> The [`customer` object](/docs/api/liquid/objects/customer) is directly accessible globally when a customer is logged in to their account.",
      "name": "customer"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because an unsaved discount doesn't exist on the [**Order status** page](https://help.shopify.com/manual/orders/status-tracking).",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "discount",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A discount applied to the checkout without being saved.",
      "name": "discount"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because not all discount types and details are captured.\n\nThe `checkout.discounts` property has been replaced by [`checkout.discount_applications`](/docs/api/liquid/objects/checkout#checkout-discount_applications).",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount"
        }
      ],
      "summary": "The discounts applied to the checkout.",
      "name": "discounts"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount_application"
        }
      ],
      "summary": "The discount applications for the checkout.",
      "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": "array",
          "name": "",
          "description": "",
          "array_value": "discount_application"
        }
      ],
      "summary": "The total amount of the discounts applied to the checkout in the currency's subunit.",
      "name": "discounts_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": "array",
          "name": "",
          "description": "",
          "array_value": "discount_application"
        }
      ],
      "summary": "The total amount of the discounts applied to the checkout in the currency's subunit, as a negative value.",
      "name": "discounts_savings"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The email associated with the checkout.",
      "name": "email"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because `nil` is always returned.",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The financial status of the checkout.",
      "name": "financial_status"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because `nil` is always returned.",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A timestamp for the fulfullment of the checkout.",
      "name": "fulfilled_at"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because the array is always empty.",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The fulfilled line items from the checkout.",
      "name": "fulfilled_line_items"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because `unfulfilled` is always returned.",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The fulfillment status of the checkout.",
      "name": "fulfillment_status"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is output in the customer's local (presentment) currency.\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 amount of the checkout price paid in gift cards.",
      "name": "gift_cards_amount"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The ID of the checkout.",
      "name": "id"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The line items of the checkout.",
      "name": "line_items"
    },
    {
      "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 of the checkout in the currency's subunit, after any line item discounts.\nhave been applied.",
      "name": "line_items_subtotal_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "This value is the same as [`checkout.id`](/docs/api/liquid/objects/checkout#checkout-id) with a `#` prepended to it.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The name of the checkout.",
      "name": "name"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Additional information entered by the customer with the [cart](/docs/api/liquid/objects/cart#cart-note).",
      "name": "note"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "Depending on the payment provider, the order might not have been created when the [**Thank you** page](https://help.shopify.com/en/manual/orders/status-tracking)\nis first viewed. In this case, `nil` is returned.\n> Note:\n> The `order` object isn't available on the **Thank you** page.",
      "examples": [],
      "return_type": [
        {
          "type": "order",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The order created by the checkout.",
      "name": "order"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is the same as [`order.id`](/docs/api/liquid/objects/order#order-id).\n\nDepending on the payment provider, the order might not have been created when the [**Order status** page](https://help.shopify.com/en/manual/orders/status-tracking)\nis first viewed. In this case, `nil` is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The ID of the order created by the checkout.",
      "name": "order_id"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is the same as [`order.name`](/docs/api/liquid/objects/order#order-name).\n\nDepending on the payment provider, the order might not have been created when the [**Order status** page](https://help.shopify.com/en/manual/orders/status-tracking)\nis first viewed. In this case, `nil` is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The name of the order created by the checkout.",
      "name": "order_name"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is the same as [`order.order_number`](/docs/api/liquid/objects/order#order-order_number).\n\nDepending on the payment provider, the order might not have been created when the [**Order status** page](https://help.shopify.com/en/manual/orders/status-tracking)\nis first viewed. In this case, `nil` is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "An integer representation of the name of the order created by the checkout.",
      "name": "order_number"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if any of the line items of the checkout require shipping. Returns `false` if not.",
      "name": "requires_shipping"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "address",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The shipping address of the checkout.",
      "name": "shipping_address"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "shipping_method",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The shipping method of the checkout.",
      "name": "shipping_method"
    },
    {
      "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 checkout in the currency's subunit.",
      "name": "shipping_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "tax_line"
        }
      ],
      "summary": "The tax lines for the checkout.",
      "name": "tax_lines"
    },
    {
      "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 tax amount of the checkout 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 price of the checkout in the currency's subunit.",
      "name": "total_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "transaction"
        }
      ],
      "summary": "The transactions of the checkout.",
      "name": "transactions"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because the array is always empty.",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The unavailable line items of the checkout.",
      "name": "unavailable_line_items"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because the array is always the same as [`checkout.line_items`](/docs/api/liquid/objects/checkout#checkout-line_items).",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The unfulfilled line items of the checkout.",
      "name": "unfulfilled_line_items"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The number of items in the checkout.",
      "name": "item_count"
    }
  ],
  "summary": "A customer's checkout.",
  "name": "checkout",
  "examples": [],
  "json_data": {
    "path": "",
    "handle": "",
    "data_from_file": "{\"applied_gift_cards\":[],\"attributes\":{},\"billing_address\":{},\"buyer_accepts_marketing\":false,\"cart_level_discount_applications\":[],\"currency\":\"CAD\",\"customer\":{},\"discount_applications\":[],\"discounts_amount\":4224,\"discounts_savings\":-4224,\"email\":\"cornelius.potionmaker@gmail.com\",\"gift_cards_amount\":0,\"id\":29944051400769,\"line_items\":[],\"line_items_subtotal_price\":42249,\"name\":\"#29944051400769\",\"note\":null,\"order\":null,\"order_id\":null,\"order_name\":\"#29944051400769\",\"order_number\":\"#29944051400769\",\"requires_shipping\":true,\"shipping_address\":{},\"shipping_method\":{},\"shipping_price\":0,\"tax_lines\":[],\"tax_price\":0,\"total_price\":38025,\"transactions\":[]}"
  },
  "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