line_item

A line_item represents a single line in the shopping cart. There is one line item for each distinct product variant in the cart.

The line_item object can be accessed in all Liquid templates via cart.items.

The line_item object has the following attributes:

line_item.title

Returns the title of the line item.

line_item.product

Returns the product of the line item. More info ›

line_item.variant

Returns the variant of the line item. More info ›

line_item.img_url

Returns the relative image URL of the line item.

line_item.url

Returns the relative URL of the line item. The relative URL does not include your store's root URL.

line_item.quantity

Returns the quantity of the line item.

line_item.price

Returns the price of the line item's variant.

line_item.original_price

Returns the original price of the line item before discounts were applied.

line_item.line_price

Returns the combined price of all the items in the line_item. This is equal to line_item.price times line_item.quantity.

line_item.original_line_price

Returns the original price of the line item before discounts were applied.

icon-accounticon-add-newicon-add-storeicon-appicon-appleicon-archiveicon-arrowdownicon-ascicon-bookicon-cancelicon-cart-addonicon-checkouticon-cherryicon-collectionicon-comfirmicon-confirmicon-couponicon-creditsicon-currencyicon-dashboardicon-discounticon-disintegrateicon-domainicon-dscicon-duplicateicon-editicon-emailicon-exclamation-triangleicon-exporticon-eyeicon-eye-slashicon-fullscreenicon-fullscreen-closeicon-generalicon-gifticon-gridicon-hddicon-helpicon-importicon-infoicon-integrationicon-invoiceicon-likeicon-listicon-locationicon-logouticon-new-tabicon-not-secureicon-optionicon-ordericon-outline-arrowdownicon-pageicon-paymenticon-plusicon-posicon-pricingicon-printericon-producticon-product-sumicon-product-sum-xicon-redirecticon-reporticon-reseticon-searchicon-secureicon-settingicon-shippingicon-staricon-storeicon-switch-storeicon-tagicon-taxesicon-templateicon-themeicon-tickicon-trashicon-unarchiveicon-uploadicon-user-tagicon-usersicon-weighticon-wholesale