Discounts

Discounts can be applied at the line item or cart/checkout/order level, meaning that they apply directly to specific line items, or apply to the cart as a whole. They can come from one of the following sources:

Discounts from each source have a discount_application, which registers the discount on the cart, checkout, or order. If any discounts are line item-specific, a discount_allocation is created for each associated line item to register any discount_applications with the line item.

Given that discounts can apply directly to line items or the cart as a whole, there are two areas where you should display discount information:

Cart page with discounts showing