selling_plan_allocation オブジェクト
定期配送プラン(サブスクリプション)を適用した際の価格情報や配送詳細を表すオブジェクト。line_item、variant、product から参照でき、プラン適用時の実額や調整額を取得できる。
仕様
194 行 / json{
"access": {
"global": false,
"parents": [
{
"object": "line_item",
"property": "selling_plan_allocation"
},
{
"object": "variant",
"property": "selling_plan_allocations"
},
{
"object": "product",
"property": "selected_selling_plan_allocation"
},
{
"object": "product",
"property": "selected_or_first_available_selling_plan_allocation"
},
{
"object": "variant",
"property": "selected_selling_plan_allocation"
},
{
"object": "remote_product",
"property": "selected_selling_plan_allocation"
},
{
"object": "remote_product",
"property": "selected_or_first_available_selling_plan_allocation"
}
],
"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": "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 price.",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The price of the selling plan allocation in the currency's subunit.",
"name": "price"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "The value of the **compare at** price is the line item's price without the selling plan applied.\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 price.",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The **compare at** price of the selling plan allocation in the currency's subunit.",
"name": "compare_at_price"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "The maximum length of the array is two. If the associated selling plan doesn't create any price adjustments, then the\narray is empty.\n\nEach `selling_plan_allocation_price_adjustment` maps to a [`selling_plan_price_adjustment`](/docs/api/liquid/objects/selling_plan_price_adjustment)\nin the [`selling_plan.price_adjustments` array](/docs/api/liquid/objects/selling_plan#selling_plan-price_adjustments). The\n`selling_plan.price_adjustments` array contains the intent of the selling plan, and the\n`selling_plan_allocation.price_adjustments` array contains the resulting money amounts.",
"examples": [],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "selling_plan_allocation_price_adjustment"
}
],
"summary": "The selling plan allocation price adjustments.",
"name": "price_adjustments"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "If the variant doesn't have a unit price, then `nil` is returned.\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 price.",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The [unit price](/docs/api/liquid/objects/variant#variant-unit_price) of the variant associated with the selling plan, in the currency's subunit.",
"name": "unit_price"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "If a selling plan includes multiple deliveries, then the `per_delivery_price` is the `price` divided by the number of\ndeliveries.\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 price.",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The price for each delivery in the selling plan in the currency's subunit.",
"name": "per_delivery_price"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "selling_plan",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The selling plan that created the allocation.",
"name": "selling_plan"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The ID of the [`selling_plan_group`](/docs/api/liquid/objects/selling_plan_group) that the selling plan of the allocation belongs to.",
"name": "selling_plan_group_id"
},
{
"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 price.",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The amount that the customer will be charged at checkout in the currency's subunit.",
"name": "checkout_charge_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 price.",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The remaining amount for the customer to pay, in the currency's subunit.",
"name": "remaining_balance_charge_amount"
}
],
"summary": "Information about how a specific [selling plan](/apps/subscriptions/selling-plans) affects a line item.",
"name": "selling_plan_allocation",
"examples": [],
"json_data": {
"path": "/products/health-potion?variant=39897499828289&selling_plan=2595487809",
"handle": "product.selected_selling_plan_allocation",
"data_from_file": ""
},
"return_type": []
}出典・ライセンス
- Repository:
- https://github.com/Shopify/theme-liquid-docs
- License:
- MIT
このコードは Shopify 著作の MIT ライセンスソースです。 原本の著作権は Shopify が保有します。日本語訳は ALSEL によるものです。
関連項目
content_for_header オブジェクト
Shopify が必要とするスクリプト(分析・チェックアウト・言語設定など)をすべて動的に出力するオブジェクト。theme.liquid の <head> タグ内に埋め込む必須要素。
metaobjects オブジェクト
ストア全体のメタオブジェクト定義にアクセスするグローバルオブジェクト。個別のメタオブジェクトはタイプとハンドルで参照でき、メタオブジェクト定義のエントリをループで反復処理できる。
additional_checkout_buttons オブジェクト
PayPal Express Checkout など、オフサイト決済に対応した外部決済プロバイダーがストアに設定されているかを真偽値で返す。`content_for_additional_checkout_buttons` と組み合わせて、該当するチェックアウトボタンを条件付きで表示する。
canonical_url オブジェクト
現在のページの正規 URL を取得するオブジェクト。Google などの検索エンジンに対してどのページ版が正規であるかを指定するために使用する。
content_for_index オブジェクト
ホームページに表示するセクションの内容を動的に返すオブジェクト。Liquid インデックステンプレートで必ず使用する。
content_for_additional_checkout_buttons オブジェクト
PayPal、Apple Pay、Google Pay など複数の決済プロバイダが有効になっているとき、その決済ボタンを HTML として出力するオブジェクト。`additional_checkout_buttons` で有無を判定したうえで、このオブジェクトで実際のボタンを表示する。