In case when the project has to support weighted units (e.g. KGs), we can stick with the following logic:
Set the sales unit of product to grams
Specify the sales price per kilogram (e.g. 3 eur)
Ensure that gram and kilogram unit have the same unit type, and specify the conversion rate of "1000"
Add 100 products to cart (e.g. equivalent of 0.1kg)
The cart result: Base price of entry is price/1000 (e.g. 0.003), and the total price is calculated correctly (e.g. 0.30 eur).
But the promotion engine has the following issues:
Logic from ordercalculation
extension would round the base price to 2 digits after comma (in case of example to 0.00
) and all the subsequent calculations would end up incorrect
The conditions can't be expressed using decimal places ( quantity x 1000
is not viable, since would be management nightmare).
Are there any suggestions on how to properly address these issues without rewriting the promotion engine from scratch?
This issue is because SAP Commerce does not support decimal quantities - I know order and its entries are with long history (legacy?), but with promotion engine there was a chance to support the weighted items right from the start.