Understand customization of order line items

Orders are broken down into line items that each contain data about an individual SKU being purchased.

For example, if a shopper adds a specific SKU to the shopping cart and specifies a quantity of 4, a single line item is created that stores information about the SKU, the parent product, the SKU price, the quantity (4), and the total price of the 4 SKUs. When you view the shopping cart page, it shows a separate entry for each line item. For example, the following illustration shows two line items, one with a quantity of 4 and the other with a quantity of 1:

shopping cart

If the shopper modifies a quantity value on this page, the corresponding line item is updated to reflect the new quantity and total price.

Line items have a predefined set of properties. In some cases, you may want to store additional data that does not correspond to one of these properties. This is especially useful if you have SKUs that can be customized in some way. For example, if you sell items that can be monogrammed, your site needs a way to store the initials for the monogram.

To enable storing such data, Commerce provides support for adding custom properties to line items. You can use these properties for customization data, such as the initials for a monogram.

If you add custom properties to line items, your storefront needs to provide a way for shoppers to specify the values of these properties. It should also enable shoppers to split a line item whose quantity is greater than 1 into multiple line items, so that each item can be customized individually.

For example, suppose a shopper adds a coffee mug to the cart, and specifies a quantity of 3. Doing this creates a single line item. If the shopper sets a custom monogram property on the line item, the value applies to all three mugs. To specify different values for each mug, he or she will first need to break the single line item whose quantity value is 3 into three separate line items, each with a quantity of 1.

Commerce provides support for splitting line items in this way. The Implement a custom cart summary widget section shows an example of how you can modify your storefront to provide the controls for splitting line items and specifying values of custom properties.

Note that this feature does not support splitting or personalizing line items representing products configured through the integration of Oracle Commerce and Oracle CPQ.