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

line_item オブジェクト

カート、チェックアウト、注文内の個別商品行を表すオブジェクト。商品 ID、数量、価格、割引情報などをアクセスできる。

用途
カートページで各商品の小計や割引を表示したり、注文確認画面で商品ごとの詳細を出すときに使う。
設置場所
Liquid テンプレート内で `{{ line_item.quantity }}`、`{{ line_item.final_price }}`、`{{ line_item.product.title }}` のように参照する。cart.line_items、checkout.line_items、order.line_items のループ内で利用できる。
注意点
`line_item.price` と `line_item.line_price` は廃止予定で、自動割引とディスカウントコードが含まれない。代わりに `line_item.final_price` と `line_item.final_line_price` を使うこと。JPY や KRW など小数点以下の単位がない通貨の場合、金額は小数位を含めて出力される(例:1000 円 = 100000)ため、フォーマット時は money フィルターを使う。
タグ:line-itemcartordercheckoutproduct-quantity

仕様

732 行 / json
{
  "access": {
    "global": false,
    "parents": [
      {
        "object": "cart",
        "property": "line_items"
      },
      {
        "object": "checkout",
        "property": "line_items"
      },
      {
        "object": "order",
        "property": "line_items"
      },
      {
        "object": "parent_relationship",
        "property": "parent"
      }
    ],
    "template": []
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "",
  "properties": [
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The ID differs depending on the context. The following table outlines the possible contexts and their associated values:\n\n| Context | Value |\n| --- | --- |\n| [`cart.items`](/docs/api/liquid/objects/cart#cart-items) | The ID of the line item's variant.<br><br>This ID isn't unique, and can be shared by multiple items with the same variant. |\n| [`checkout.line_items`](/docs/api/liquid/objects/checkout#checkout-line_items) | A temporary unique hash generated for the checkout. |\n| [`order.line_items`](/docs/api/liquid/objects/order#order-line_items) | A unique integer ID. |",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The ID of the line item.",
      "name": "id"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The quantity of the line item.",
      "name": "quantity"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because discounts from automatic discounts and discount codes aren't included.\n\nThe `line_item.price` property has been replaced by [`line_item.final_price`](/docs/api/liquid/objects/line_item#line_item-final_price).",
      "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 price of the line item in the currency's subunit. This includes any discounts from [Shopify Scripts](https://help.shopify.com/manual/checkout-settings/script-editor).",
      "name": "price"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because discounts from automatic discounts and discount codes aren't included.\n\nThe `line_item.line_price` property has been replaced by [`line_item.final_line_price`](/docs/api/liquid/objects/line_item#line_item-final_line_price).",
      "description": "The value is equal to `line_item.price` multiplied by `line_item.quantity`. It's output in the customer's local\n(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 combined price, in the currency's subunit, of all of the items in a line item. This includes any discounts from [Shopify Scripts](https://help.shopify.com/manual/checkout-settings/script-editor).",
      "name": "line_price"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because discounts from automatic discounts and discount codes aren't included.\n\nThe `line_item.total_discount` property has been replaced by [`line_item.line_level_total_discount`](/docs/api/liquid/objects/line_item#line_item-line_level_total_discount).",
      "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 amount, in the currency's subunit, of any discounts applied to the line item by [Shopify Scripts](https://help.shopify.com/manual/checkout-settings/script-editor).",
      "name": "total_discount"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Caution:\n> Not applicable for item component as discounts are applied to the parent line item.",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount_allocation"
        }
      ],
      "summary": "The discount allocations that apply to the line item.",
      "name": "discount_allocations"
    },
    {
      "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 price of the line item in the currency's subunit. This includes any line-level discounts.",
      "name": "final_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is equal to `line_item.final_price` multiplied by `line_item.quantity`. It's output in the customer's local\n(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 combined price, in the currency's subunit, of all of the items in the line item. This includes any line-level discounts.",
      "name": "final_line_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [ID](/docs/api/liquid/objects/variant#variant-id) of the line item's variant.",
      "name": "variant_id"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [ID](/docs/api/liquid/objects/product#product-id) of the line item's product.",
      "name": "product_id"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "product",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The product associated with the line item. May be a regular [product](/docs/api/liquid/objects/product) or a [remote product](/docs/api/liquid/objects/remote_product).",
      "name": "product"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "variant",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The variant associated with the line item.",
      "name": "variant"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "tax_line"
        }
      ],
      "summary": "The tax lines for the line item.",
      "name": "tax_lines"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "fulfillment",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The fulfillment of the line item.",
      "name": "fulfillment"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The number of items from the line item that have been successfully fulfilled.",
      "name": "successfully_fulfilled_quantity"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [fulfillment service](https://help.shopify.com/manual/shipping/understanding-shipping/dropshipping-and-fulfillment-services)\nfor the vartiant associated with the line item. If there's no fulfillment service, then `manual` is returned.",
      "name": "fulfillment_service"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "You can add, or allow customers to add, custom information to a line item with line item properties.\n\nLine item properties consist of a name and value pair. They can be captured with the following methods:\n\n- [A custom input inside a product form](/themes/architecture/templates/product#line-item-properties)\n- [The AJAX Cart API](/api/ajax/reference/cart#add-line-item-properties)\n\n> Tip:\n> To learn about how to display captured properties, refer to [Display line item properties](/themes/architecture/templates/cart#display-line-item-properties).",
      "examples": [
        {
          "name": "Capture line item properties in the product form",
          "description": "To capture line item properties inside the [product form](/docs/api/liquid/tags/form#form-product), you need to include an input, for each property. Each  input needs a unique `name` attribute. Use the following format:\n\n```\nname=\"properties[property-name]\"\n```\n\nThe value of the input is captured as the value of the property.\n\nFor example, you can use the following code to capture custom engraving text for a product:\n\n```liquid\n{% form 'product', product %}\n  ...\n  <label for=\"engravingText\">Engraving<label>\n  <input type=\"text\" id=\"engravingText\" name=\"properties[Engraving]\">\n  ...\n{% endform %}\n```\n\n> Tip:\n> You can add an underscore to the beginning of a property name to hide it from customers at checkout. For example,\n> `properties[_hiddenPropertyName]`.\n",
          "syntax": "",
          "path": "/products/health-potion",
          "raw_liquid": "",
          "parameter": false,
          "display_type": "text",
          "show_data_tab": true
        }
      ],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "untyped"
        }
      ],
      "summary": "The properties of the line item.",
      "name": "properties"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "To learn about how to display unit prices in your theme, refer to [Unit pricing](/themes/pricing-payments/unit-pricing).\n\n> Tip:\n> Use the [`unit_price_with_measurement` filter](/docs/api/liquid/filters/unit_price_with_measurement) with the\n> `line_item.unit_price` property and this property to output a formatted unit price with measurement.",
      "examples": [],
      "return_type": [
        {
          "type": "unit_price_measurement",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The unit price measurement of the line item.",
      "name": "unit_price_measurement"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The price reflects any discounts that are applied to the line item. The value is output in the customer's local\n(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 the [`unit_price_with_measurement` filter](/docs/api/liquid/filters/unit_price_with_measurement) with this\n> property and the `line_item.unit_price_measurement` property to output a formatted unit price with measurement.\n\nTo learn about how to display unit prices in your theme, refer to [Unit pricing](/themes/pricing-payments/unit-pricing).",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [unit price](https://help.shopify.com/manual/products/details/product-pricing/unit-pricing#add-unit-prices-to-your-product)\n of the line item in the currency's subunit.",
      "name": "unit_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The [sku](/docs/api/liquid/objects/variant#variant-sku) of the variant associated with the line item.",
      "name": "sku"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The following table outlines what's returned depending on the number of discounts affecting the line item:\n\n| Number of discounts | Value |\n| --- | --- |\n| 0 | `nil` |\n| 1 | The [title](/docs/api/liquid/objects/discount_application#discount_application-title) of the discount. |\n| More than 1 | A Shopify generated string noting how many discounts have been applied. |",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Information about the discounts that have affected the line item.",
      "name": "message"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The vendor of the variant associated with the line item.",
      "name": "vendor"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "In most contexts, the line item title appears in the customer's preferred language. However, in the context of an\n[order](/docs/api/liquid/objects/order), the line item title appears in the language that the customer checked out in.\nThe title can receive an override value from the [Cart Transform API](/docs/api/functions/reference/cart-transform#showing-overrides).\nOverrides take precedence over translations.\n\n#### Line item title history\n\nWhen referencing line item, product, and variant titles in the context of an order, the following changes might result\nin a different output than you expect:\n\n- A product or variant being deleted\n- A product or variant title being edited\n\nWhen `line_item.title` is referenced for an order, the line item title at the time of the order is returned.\nHowever, when `line_item.product.title` and `line_item.variant.title` are referenced, the current value for\neach title is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The title of the line item. The title is a combination of `line_item.product.title` and `line_item.variant.title`, separated\nby a hyphen.",
      "name": "title"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if taxes should be charged on the line item. Returns `false` if not.",
      "name": "taxable"
    },
    {
      "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 price of the line item in the currency's subunit, before discounts have been applied.",
      "name": "original_price"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The value is equal to `line_item.original_price` multiplied by `line_item.quantity`. It's output in the customer's local\n(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 combined price of all of the items in a line item in the currency's subunit, before any discounts have been applied.",
      "name": "original_line_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 amount of any discounts applied to the line item in the currency's subunit.",
      "name": "line_level_total_discount"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Caution:\n> Not applicable for item component as discounts are applied to the parent line item.",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount_allocation"
        }
      ],
      "summary": "The discount allocations that apply directly to the line item.",
      "name": "line_level_discount_allocations"
    },
    {
      "deprecated": true,
      "deprecation_reason": "Deprecated because not all discount types and details are available.\n\nThe `line_item.discounts` property has been replaced by [`line_item.discount_allocations`](/docs/api/liquid/objects/line_item#line_item-discount_allocations).",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "discount"
        }
      ],
      "summary": "The discounts applied to the line item.",
      "name": "discounts"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the product associated with the line item is a gift card. Returns `false` if not.",
      "name": "gift_card"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the variant associated with the line item requires shipping. Returns `false` if not.",
      "name": "requires_shipping"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\n> The array is never empty because variants with no options still have a default option. Because of this, you should use\n> `line_item.product.has_only_default_variant` to check whether there's any information to output.",
      "examples": [
        {
          "name": "Output the option values",
          "description": "",
          "syntax": "",
          "path": "/",
          "raw_liquid": "{% for item in cart.items %}\n<div class=\"cart__item\">\n  <p class=\"cart__item-title\">\n    {{ item.title }}\n  </p>\n\n  {%- unless item.product.has_only_default_variant %}\n  <ul>\n    {% for option in item.options_with_values -%}\n    <li>{{ option.name }}: {{ option.value }}</li>\n    {%- endfor %}\n  </ul>\n  {% endunless %}\n</div>\n{% endfor %}",
          "parameter": false,
          "display_type": "text",
          "show_data_tab": true
        }
      ],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "untyped"
        }
      ],
      "summary": "The name and value pairs for each option of the variant associated with the line item.",
      "name": "options_with_values"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "Line item keys are unique identifiers that consist of the following components separated by a colon:\n\n- The ID of the variant associated with the line item\n- A hash of unique characteristics of the line item.\n\nNote: Line item keys are not stable identifiers. The line item key will change as characteristics of the line item change. This includes, but is not limited to, properties and discount applications.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The key of the line item.",
      "name": "key"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use this property with the [`weight_with_unit` filter](/docs/api/liquid/filters/weight_with_unit) to format the weight.",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The weight of the line item in the store's [default weight unit](https://help.shopify.com/manual/intro-to-shopify/initial-setup/setup-business-settings#set-or-change-your-stores-default-weight-unit).",
      "name": "grams"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The relative URL of the variant associated with the line item.",
      "name": "url"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> To learn more about how to use this property in your theme, refer to [Remove line items from the cart](/themes/architecture/templates/cart#remove-line-items-from-the-cart).",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A URL to remove the line item from the cart.",
      "name": "url_to_remove"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "The image can come from one of the following sources:\n\n- The image of the variant associated with the line item\n- The featured image of the product associated with the line item, if there's no variant image",
      "examples": [],
      "return_type": [
        {
          "type": "image",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The image of the line item.",
      "name": "image"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "#### Availability of selling plan information\n\nThe following properties aren't available when referencing selling plan information through an\n[order's line items](/docs/api/liquid/objects/order#order-line_items):\n\n- [`selling_plan_allocation.compare_at_price`](/docs/api/liquid/objects/selling_plan_allocation#selling_plan_allocation-compare_at_price)\n- [`selling_plan_allocation.price_adjustments`](/docs/api/liquid/objects/selling_plan_allocation#selling_plan_allocation-price_adjustments)\n- [`selling_plan_allocation.selling_plan.group_id`](/docs/api/liquid/objects/selling_plan#selling_plan-group_id)\n- [`selling_plan_allocation.selling_plan.options`](/docs/api/liquid/objects/selling_plan#selling_plan-options)\n- [`selling_plan_allocation.selling_plan.price_adjustments`](/docs/api/liquid/objects/selling_plan#selling_plan-price_adjustments)\n- [`selling_plan_allocation.selling_plan_group_id`](/docs/api/liquid/objects/selling_plan_allocation#selling_plan_allocation-selling_plan_group_id)\n\n> Tip:\n> If you need to show selling plan information post-purchase, then you should use [`selling_plan.name`](/docs/api/liquid/objects/selling_plan#selling_plan-name).",
      "examples": [],
      "return_type": [
        {
          "type": "selling_plan_allocation",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The selling plan allocation of the line item. If the line item doesn't have a selling plan allocation, then `nil` is returned.",
      "name": "selling_plan_allocation"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\n> This field is applicable for cart line item only.",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The components of a line item.",
      "name": "item_components"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\n> This field is applicable for cart line item only.",
      "examples": [],
      "return_type": [
        {
          "type": "instructions",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Instructions define behaviours and operations that can be performed on the nested cart line.",
      "name": "instructions"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\n> This field is applicable for cart line item only.",
      "examples": [],
      "return_type": [
        {
          "type": "parent_relationship",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The parent relationship for a nested line item.",
      "name": "parent_relationship"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Note:\nThis field is applicable for cart line item only and currently available for shops using Checkout Extensibility.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "An informational error message about the status of the line item in the buyer's chosen language.",
      "name": "error_message"
    }
  ],
  "summary": "A line in a cart, checkout, or order. Each line item represents a product variant.",
  "name": "line_item",
  "examples": [],
  "json_data": {
    "path": "/",
    "handle": "customer.orders[4].line_items[0]",
    "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