Ez5ScaledPriceService determines the correct price by comparing base price from the price request to the
stored in extended data (also in
PriceRequest). The service determines the best price if there are multiple scaled prices that match.
This data may come from the backend. The CatalogFactory stores data in the correct format in the catalog element.
Scaled prices can be set up per product in the Back Office:
||no||Code for the customer group||
||yes||Minimum quantity for the given price. If more than one scaled price entry matches, the latest matching entry is used||
||yes (can be empty)||Start date can be set in two formats (date with and without time). If no time is given, "00:00:00" (hour-minutes-seconds) is used. 2015-06-01 becomes 2015-06-01 00:00:00||
||no||End date can be set in two formats (date with and without time). If no time is given, "23:59:59" (hour-minutes-seconds) is used. 2015-06-01 becomes 2015-06-01 23:59:59||
||yes||Price used to calculate price gross and price net value. Price can be with or without VAT||
|Is Including VAT||
||yes||Determines if the price includes VAT or not.||
||no||If not set, it's calculated based on two previous values: Price and Is Including VAT. If set, gross price value overrides the calculation.|
||no||If not set, it's calculated based on two previous values: Price and Is Including VAT. If set, net price value overrides the calculation.|
ProductNode contains additional attribute for scaled prices.
Ez5CatalogFactory extracts this value and puts it into an ArrayField.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Scaled price matching¶
The scaled price matches in the following cases:
- Customer group is not defined or customer group matches the customer group from buyer party
- Price line quantity is greater than the scaled price minimum quantity
startDateis not defined or the current date is more than
endDateis not defined or the current date is less than
customerGroups are stored in customer profile data inside Buyer Party:
1 2 3 4 5 6 7 8
1 2 3 4
ScaledPriceServiceInterface calculates the correct price if there is a scaled price available.
This is determined by the following attributes:
||This method always returns matching scaled price