Hi community!
We seem to have encountered a potential issue with discount calculations in Umbraco Commerce V13.
Scenario (see image):
- We have a product with an original price of approximately €1,652.07.
- The product itself is already discounted and displayed in the order at €1,288.61.
- Shipping costs are €9.50
- A 15% discount is then applied on the order total.
Expected behavior:
The 15% discount should be calculated based on the current visible order total (€1,298.11 including shipping) or at least based on the already discounted product price.
Actual behavior:
The discount amount is calculated using the original product price instead:
- €1,652.07 + €9.50 = €1,661.57
- 15% of this = €249.24
This results in a “Net Total Discount” of €249.24, even though the visible net total before discount is only €1,298.11.
Because of this, the discount shown in the totals does not match the displayed order values and appears inconsistent to the customer.
It looks like Umbraco Commerce is calculating the discount using the original order line price rather than the adjusted/current order line total.
Can anyone confirm whether this is expected behavior or potentially a bug?
Note: we have no custom logic which recalculated the state of subtotal, shipping or total. The only adjustment is the order line discount, which is applicable. I think this is not the problem because the order total (with the order line adjustments) of €1,298.11 is calculated correctly.
Greetings,
Joppe
