Formula Pricing (Advanced Config Add-On)
Formula pricing requires the Pricesystem Advanced Config Add-On:
- Composer package:
mageb2b/pricesystem-advancedconfig - Magento module:
MageB2B_PricesystemCoreAdvancedConfig
When Formula Pricing Is Used
Formula pricing is used when the selected strategy is "Individual price formula":
- globally via
pricesystem/price_select_rule/priceselect = 4, or - via customer/group override (customer/group UI option "Individual price formula")
Where To Set The Formula
The formula itself is resolved in this order:
- Customer attribute
price_formula(if set and non-empty) - Customer group column
price_formula(if set and non-empty) - System configuration
pricesystem/price_select_rule/formula
Variables (Price Codes)
In formulas you reference price codes such as:
customer_pricepricelistspecial_pricetier_priceorig_price
Notes:
- Both
code_with_underscoresandcodewithunderscoresare accepted. orig_priceis always available as a reference for fallback and for formulas.- If
pricesystem/price_calculation/skip_zero_price = Yes, zero or negative prices are ignored for formula inputs.
Supported Functions
The formula engine supports helpers like:
low(code)(minimum)high(code)(maximum)avg(code)(average)
and utility functions:
min(a, b, ...)max(a, b, ...)round(value, decimals?)abs(value)
Missing Input Behavior
Configure how missing values are handled:
- Config path:
pricesystem/price_select_rule/formula_missing_input_behavior
Typical behaviors:
- Fail and use fallback strategy (strict)
- Treat missing values as
0(lenient)
Formula Error Fallback
If the formula is empty, invalid, or evaluates to a non-positive result, Pricesystem can fall back to a strategy:
- Config path:
pricesystem/price_select_rule/formula_fallback_strategy
Fallback strategies include:
- Lowest
- Highest
- Sort order
- Original price
