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

customer_payment_method オブジェクト

顧客がアカウントに保存した支払い方法(クレジットカードなど)を表すオブジェクト。支払い方法の種類と識別子にアクセスできる。

用途
顧客アカウントページで保存済みクレジットカード一覧を表示したり、チェックアウト時に登録済み支払い方法を選択できるようにするとき。
設置場所
顧客が保存した支払い方法にアクセスするには、`{{ customer.payment_methods }}` で配列を取得し、ループ内で `{{ payment_method.payment_instrument_type }}` や `{{ payment_method.token }}` で各プロパティを参照する。
注意点
customer_payment_method は `customer.payment_methods` の子オブジェクトのため、グローバルに直接アクセスできない。顧客がログインしていることが前提となる。token は支払い方法の一意識別子だが、実カード番号やセキュリティコードは含まれず、安全にストア側で管理できる。
タグ:customerpayment-methodaccountcheckout

仕様

58 行 / json
{
  "access": {
    "global": false,
    "parents": [
      {
        "object": "customer",
        "property": "payment_methods"
      }
    ],
    "template": []
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "A payment method that a customer has saved to their account for reuse (e.g. a credit card).",
  "properties": [
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The instrument type of the payment method (e.g credit_card).",
      "name": "payment_instrument_type"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The identifier for the payment method.",
      "name": "token"
    }
  ],
  "summary": "A customer's saved payment method.",
  "name": "customer_payment_method",
  "examples": [],
  "json_data": {
    "path": "",
    "handle": "",
    "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