line_item
A line in a cart, checkout, or order. Each line item represents a product variant.
Properties
The discount allocations that apply to the line item.
The combined price, of all of the items in the line item. This includes any line-level discounts.
The value is equal to line_item.final_price multiplied by line_item.quantity.
Use money helper to output a formatted amount.
The price of the line item. This includes any line-level discounts.
Use money helper to output a formatted amount.
The fulfillment of the line item.
Returns true if the product associated with the line item is a gift card. Returns false if not.
The image of the line item.
The image can come from one of the following sources:
- The image of the variant associated with the line item
- The featured image of the product associated with the line item, if there's no variant image
The key of the line item.
Line item keys are unique identifiers that consist of the following components separated by a colon:
- The ID of the variant associated with the line item
- A hash of the properties of the line item, even if there are no properties
The discount allocations that apply directly to the line item.
The total amount of any discounts applied to the line item.
Use money helper to output a formatted amount.
The name and value pairs for each option of the variant associated with the line item.
The array is never empty because variants with no options still have a default option. Because of this, you should use line_item.product.has_only_default_variant to check whether there's any information to output.
The combined price of all of the items in a line item, before any discounts have been applied.
The value is equal to line_item.original_price multiplied by line_item.quantity.
Use money helper to output a formatted amount.
The price of the line item, before discounts have been applied.
Use money helper to output a formatted amount.
The product associated with the line item.
The ID of the line item's product.
The properties of the line item.
You can add, or allow customers to add, custom information to a line item with line item properties.
Line item properties consist of a name and value pair. They can be captured with the following methods:
- A custom input inside a product form
- The AJAX Cart API
The quantity of the line item.
Returns true if the variant associated with the line item requires shipping. Returns false if not.
The selling plan allocation of the line item. If the line item doesn't have a selling plan allocation, then null is returned.
The sku of the variant associated with the line item.
The number of items from the line item that have been successfully fulfilled.
Returns true if taxes should be charged on the line item. Returns false if not.
The relative URL of the variant associated with the line item.
A URL to remove the line item from the cart.
The variant associated with the line item.
The ID of the line item's variant.
The vendor of the variant associated with the line item.