CalculationOverride
- Version
- 4.0 preview
- Updated
Per-customer-group calculation overrides, serialised into one column.
Storage kind: column · Column: text
Use it to let a shop owner point specific customer groups at a different calculation than the
default — trade pricing that uses a different formula, not merely a different number. When the
difference is just a number, groupPrice is the lighter tool.
Settings
| Setting | Meaning |
|---|---|
overridePropertyName | The calculation property this overrides |
Notes
Structurally the sibling of groupPrice: a JSON list keyed by customer group,
posted from a hidden input, stored in one text column, showing a count in the list rather than the
values.
It carried the same silently-discarding bug and the same fix — a value that does not decode to an array is treated as empty rather than iterated.
copyOverrides() runs during a record copy so the copy's overrides point at the copied
calculations rather than the originals — the same reasoning as
calculation's copyCalculation(), and it has to happen there too or a duplicated
product's group pricing would quietly drive the source product's formulas. It honours
storeExternally.
The same querying caveat applies as for groupPrice: the set lives in one column, so "which records
override for group 7" is not a SQL question.
@see groupprice.md @see calculation.md