saleor-core

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Saleor Core

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.
基于Saleor核心源代码整理的后端行为参考。涵盖了公开API参考中未完整记录的内部机制——折扣优先级、叠加规则、非规范化字段,以及已知的Dashboard问题。

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
    /
    OrderLineDiscount
    objects
  • Debugging
    unit_discount_value
    on
    OrderLine
  • Deciding whether discounts stack or suppress each other
  • 在Dashboard中构建或调试折扣/促销UI
  • 排查优惠券或促销活动无法生效的问题
  • 理解订单级与商品行级折扣的优先级
  • 处理
    OrderDiscount
    /
    OrderLineDiscount
    对象
  • 调试
    OrderLine
    中的
    unit_discount_value
    字段
  • 判断折扣是否可叠加或相互抑制

Rule Categories

规则分类

PriorityCategoryImpactPrefix
1DiscountsCRITICAL
discount-
优先级分类影响级别前缀
1折扣规则关键
discount-

Quick Reference

快速参考

1. Discounts (CRITICAL)

1. 折扣规则(关键)

  • discount-precedence
    — Full precedence hierarchy, stacking rules, manual vs voucher vs promotion interactions, denormalized field semantics, known Dashboard bug
  • discount-precedence
    — 完整的优先级层级、叠加规则、手动折扣与优惠券/促销活动的交互逻辑、非规范化字段语义、已知的Dashboard bug

How to Use

使用方法

Read individual rule files for detailed explanations and source-level evidence:
rules/discount-precedence.md
Each rule file contains:
  • Precedence hierarchy with stacking matrix
  • Source code references from
    saleor/
    with function names and file paths
  • Anti-patterns and known bugs
阅读单个规则文件以获取详细说明和源代码层面的依据:
rules/discount-precedence.md
每个规则文件包含:
  • 带有叠加矩阵的优先级层级
  • 来自
    saleor/
    目录的源代码参考,包含函数名和文件路径
  • 反模式示例与已知bug