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

selling_plan_checkout_charge オブジェクト

サブスクリプション販売プラン(定期購入)でチェックアウト時に顧客が支払う金額に関する情報を持つオブジェクト。金額が定価の割合か固定額かを value_type で区別し、value で具体値を取得できる。

用途
サブスクリプション対応ストアで、商品ページやカート内に「今回は定価の50%」「初回は1000円」など、プランごとの支払い額を表示するときに使用。
設置場所
product.liquid や cart-item-row.liquid など、selling_plan 情報を表示する部分で `{{ product.selected_selling_plan.checkout_charge.value_type }}` や `{{ product.selected_selling_plan.checkout_charge.value }}` で参照する。
注意点
value は通貨の最小単位(セント)で出力されるため、金額フィルター(money フィルター)で整形してから表示する必要がある。JPY や KRW など小数単位がない通貨の場合、1000 円は 100000 として返される仕様のため `| money` で正しく処理する。value_type が「percentage」か「price」かで解釈が変わるので、条件分岐で両方に対応させる。
タグ:selling-plansubscriptioncheckoutpricepurchase-option

仕様

72 行 / json
{
  "access": {
    "global": false,
    "parents": [
      {
        "object": "line_item",
        "property": "selling_plan_allocation"
      },
      {
        "object": "variant",
        "property": "selling_plan_allocations"
      },
      {
        "object": "selling_plan",
        "property": "checkout_charge"
      }
    ],
    "template": []
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "To learn about how to support selling plans in your theme, refer to [Purchase options](/themes/pricing-payments/purchase-options).",
  "properties": [
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "percentage",
          "description": "",
          "array_value": ""
        },
        {
          "type": "string",
          "name": "price",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The value type of the checkout charge.",
      "name": "value_type"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "How this value is interpreted depends on the [value type](/docs/api/liquid/objects/selling_plan_checkout_charge#selling_plan_checkout_charge-value_type) of\nthe checkout charge. The following table outlines what the value represents for each value type:\n\n| Value type | Value |\n| --- | --- |\n| `percentage` | The percent amount of the original price that the customer needs to pay.<br><br>For example, if the value is 50, then the customer needs to pay 50% of the original price. |\n| `price` | The amount that the customer needs to pay in the currency's subunit. |\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 price.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The value of the checkout charge.",
      "name": "value"
    }
  ],
  "summary": "Information about how a specific [selling plan](/apps/subscriptions/selling-plans) affects the amount that a\ncustomer needs to pay for a line item at checkout.",
  "name": "selling_plan_checkout_charge",
  "examples": [],
  "json_data": {
    "path": "/products/health-potion?selling_plan=2595487809",
    "handle": "product.selected_selling_plan.checkout_charge",
    "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