Shopify Builds>Primitives>Line-item properties

Line-item properties

Definition

Line-item properties are key and value pairs attached to a cart line at the moment it's added. They travel with that line through checkout and onto the order, and keys beginning with an underscore stay on the record while staying hidden from the shopper. They are the only place a theme can put per-line data that Shopify has no field for.

Documented at shopify.dev, the line item object.

How We've Used It

Every customer-composed thing we build ends up here. A palette a shopper fills, a kit with a shade chosen per component, a bundle whose contents have to reach the warehouse: the cart line is one SKU and the picks ride along beside it. We write them twice on purpose, once as readable keys the shopper sees in the cart and at checkout, and once as underscore-prefixed keys carrying variant ids and a bundle id so the same bundle can be re-read and edited in place. What properties can't do is change a price, which is a Function's job, so a bundle built this way is a fixed-price bundle by design.

Builds Using It

One further gated build uses it; its page follows.

Related Entities

Builds