Cart discounts and targets

A cart discount has two decisions: whether the cart is eligible and where the discount value is applied. Keeping those decisions separate makes campaign behavior predictable.

Cart eligibility

The discount predicate runs against the current cart context. It can evaluate supported customer, address, currency, amount, line, and other cart fields. Missing optional values do not become invented defaults; write rules that account for a cart before an address or customer is present.

Targets

The target type determines whether a value applies at cart level, to eligible line items, or to shipping. A line-item target has its own predicate and runs in the smaller target context. A cart can satisfy the main rule while no individual line satisfies the target rule.

Example: a cart predicate can require a EUR subtotal of at least EUR 100, while the line target selects only products tagged accessories. If the cart qualifies but contains no accessory line, there is no matching line on which to allocate the reduction.

Values and totals

Cart discount values can be absolute or relative. Thor records discount applications on the cart, its lines, and shipping lines according to the selected target. Read those applications and the returned total after each change; do not divide an order-level reduction across lines in storefront code.

Priority, group membership, stacking mode, apply policy, codes, and usage limits can further decide the winning set. See Discount codes, groups, and combination.