unit_price_measurement オブジェクト
商品バリアントの単価測定情報を保持するオブジェクト。容積・重量・長さ・面積・個数などの単位でグラム当たりの価格を計算し、消費者に単価を提示するときに使う。
仕様
134 行 / json{
"access": {
"global": false,
"parents": [
{
"object": "line_item",
"property": "unit_price_measurement"
},
{
"object": "variant",
"property": "unit_price_measurement"
}
],
"template": []
},
"deprecated": false,
"deprecation_reason": "",
"description": "",
"properties": [
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "volume",
"description": "",
"array_value": ""
},
{
"type": "string",
"name": "weight",
"description": "",
"array_value": ""
},
{
"type": "string",
"name": "length",
"description": "",
"array_value": ""
},
{
"type": "string",
"name": "area",
"description": "",
"array_value": ""
},
{
"type": "string",
"name": "count",
"description": "",
"array_value": ""
}
],
"summary": "The type of unit measurement.",
"name": "measured_type"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The quantity of the unit.",
"name": "quantity_value"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The unit of measurement used to measure the [`quantity_value`](/docs/api/liquid/objects/unit_price_measurement#unit_price_measurement-quantity_value).",
"name": "quantity_unit"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The quantity of the unit for the base unit price.",
"name": "reference_value"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The unit of measurement used to measure the [`reference_value`](/docs/api/liquid/objects/unit_price_measurement#unit_price_measurement-reference_value).",
"name": "reference_unit"
}
],
"summary": "Information about how units of a product variant are measured. It's used to calculate\n[unit prices](https://help.shopify.com/manual/products/details/product-pricing/unit-pricing#add-unit-prices-to-your-product).",
"name": "unit_price_measurement",
"examples": [],
"json_data": {
"path": "/",
"handle": "customer.orders[1].line_items[0].unit_price_measurement",
"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` で有無を判定したうえで、このオブジェクトで実際のボタンを表示する。