Line item properties table

The line item properties table contains custom information for an item that has been added to the cart. This information is often used to provide product customization options.

A line item property contains two parts: a key and its value. For example, given the line item property amazonid=1234, the key is amazonid and the value is 1234.

Line item properties can be deleted after an order has been created. When this occurs, any record of the deleted line item property is deleted from this table.

This table contains one row per line item property.

Column Data type Description
line_item_id numeric ID of the line item. This column is the primary key of the table, and it is also a foreign key reference to the line_item_id column in the line items table.
shop_id numeric ID of the store. This column is a foreign key reference to the shop_id column in the shops table.
key varchar (30 characters) Name of the line item property and the first part of the key:value pair.
value varchar Value of the line item property and the second part of the key:value pair. This field always returns a string, even when the values appear to be boolean. For example, if the value is `1`, then this field returns the character 1.

A line item property contains extra information from your customers about a product that they ordered. The customer adds this information to a product page before they add the product to their cart. For example, a customer orders a silver bracelet and wants it engraved with their grandfather's name. On the product page for the bracelet, your customer enters the text that they want engraved. You can add line item properties to any product page by editing your theme.

The following example returns the price of each possible value of the line item property gift: