Saleor Core
Backend behavior reference derived from the Saleor core source code. Covers internal mechanics that aren't fully documented in the public API reference — discount precedence, stacking rules, denormalized fields, and known Dashboard gotchas.
When to Apply
- Building or debugging discount/promotion UI in the Dashboard
- Investigating why a voucher or promotion isn't applying
- Understanding order-level vs line-level discount precedence
- Working with
OrderDiscount/OrderLineDiscountobjects - Debugging
unit_discount_valueonOrderLine - Deciding whether discounts stack or suppress each other
Rule Categories
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Discounts | CRITICAL | discount- |
Quick Reference
1. Discounts (CRITICAL)
discount-precedence— Full precedence hierarchy, stacking rules, manual vs voucher vs promotion interactions, denormalized field semantics, known Dashboard bug
How to Use
Read individual rule files for detailed explanations and source-level evidence:
rules/discount-precedence.mdEach rule file contains:
- Precedence hierarchy with stacking matrix
- Source code references from
saleor/with function names and file paths - Anti-patterns and known bugs