I have a cart with 2 items added:
- Product 1 for £100
- Product 2 for £65
Product 2 is effectively a free gift, and to achieve this an automatic £65 discount is applied to the entire cart using a Shopping Cart Rule.
The customer is then applying a manual £20 discount from a voucher code they have.
The discount that should be applied at this point is £85 (£65 + £20), but what is actually applied is £77.12.
After a bit of number crunching it looks like Magento applies the £20 discount in a pro-rota fashion, working out the percentage that each product in the cart of the entire value is responsible for, and then applies that percentage discount of the £20 to each row individually.
In this example, it tries to apply £12.12 discount to Product 1 and £7.88 discount to product 2, which in the cart would total £20.
However, because product 2 has already been discounted by £65 Magento is not applying that £7.88 pro rota discount at all, so the cart is being discounted by an incorrect value of £77.12 (£65 + £12.12).
The £20 voucher is set up as follows:
Conditions: Subtotal >= £60. Actions: Fixed amount discount for whole cart of 20. Everything else set to '0' or 'No'.
The automatic £65 discount is set up as follows:
Conditions: Total amount >= £95, with a sub-condition excluding some SKUs. Actions: Fixed amount discount for whole cart of £65, everything else '0' or 'No'. Apply to only: X,Y,Z SKUs