Calculate a price with a formula
Formula pricing is part of Advanced Config. It combines available price types arithmetically instead of choosing only one.
A formula can be configured globally, for a customer group or for one customer. Resolution follows the most specific available formula: customer, then group, then global.
Price codes and helpers
Use the price codes available in your installation, such as customer_price, pricelist or orig_price.
Supported helpers include:
low(code),high(code)andavg(code)when a price type provides more than one value;min(...),max(...),round(...)andabs(...).
Example:
low(customer_price) * 0.95 + 2
The editor validates unknown price codes, unsupported functions and invalid syntax.
Missing values
Choose one of two behaviors:
- stop formula evaluation and use the configured fallback;
- treat a missing input as zero.
Fallback can use Lowest, Highest, Sort order or Original price. For a formula that refers to an optional price type, fallback is normally safer than silently treating the missing value as zero.
Test the formula with every combination of inputs that can occur in the catalog, including a product with no custom price and a price that has expired.