This issue is to show the correct calculation that apply 2 Cart Price Rules together with Bundle Packs Discount


Note: Magento frontend will calculate subtotal with Tier 1 and Tier 2 discount. For bundle packs discount amount will calculate based on bundle packs discount percentage then minus out each product Tier 1 and Tier 2 discount amount then only add to the total discount (Tier 1 and Tier 2) calculated based on subtotal. 



​First part is on Order #000000233, there are 3 promo rules applied as follow:
1) Tier 1 (1.5%) Discount (Cart Price Rules [ID:4])
2) Tier 2 (1.5%) Discount (Cart Price Rules [ID:5])
3) Bundle Packs (5%) Discount (Bundle Packs [ID:3])

I notice that this product SKU 11150.51.10.1/301M user price have changed after Order Number #000000233 from RM92 to RM94 so currently the live site testing is showing the price RM94 for customer group user. Do take note on that.

There are 2 views on the calculation frontend and backend calculation (NOTE: backend calculation might be different from manual calculation because Magento will auto do adjustment so that the amount show is match with the frontend calculation)

I will explain one example as follow:
Example for order #000000233
Front End Calculation
To get Tier 1 Discount formula as follow:

Subtotal x Tier 1 (1.5%) Discount = Total Tier 1 Discount
8630 x 1.5% = 129.45

To get Tier 2 Discount formula as below:

(Subtotal - Total Tier 1 Discount) x Tier 2 (1.5%) Discount = Total Tier 2 Discount
(8630 - 129.45) x 1.5% = 127.50825
Rounded = 127.51

Total Tier Discount formula:

Total Tier 1 + Total Tier 2 = Total Tier Discount
129.45 + 127.51 = 256.96

To Calculate Bundle Packs Discount (5% for each product)
Note: Based on order #000000233, the bundle discount apply to product SKU 11150.51.10.1/301MSKU 11030.51.10.1/1V03X(TL)

Formula as follow:

Total Amount x Bundle Packs Discount (5%) = Total Bundle Discount
SKU 11150.51.10.1/301M
(RM92 x 30 qty) x 5% = 138

SKU 11030.51.10.1/1V03X(TL)
(RM41 x 30 qty) x 5% = 61.5

Total Bundle Packs Discount for both product formula:

Total Bundle Discount Product A + Total Bundle Discount Product B = Total Bundle Packs Discount
138 + 61.5 = 199.5

Since the subtotal already calculated Tier 1 and Tier 2 of both products, then the bundle discount amount have to deduct the Tier 1 and Tier 2 discount amount for both product

SKU 11150.51.10.1/301M 
Tier 1 Discount Amount
(92 x 30) x 1.5% = 41.4

Tier 2 Discount Amount
((92 x 30) - 41.4) x 1.5% = 40.779
Rounded = 40.78

Total Tier Discount Amount
41.4 + 40.78 = 82.18

SKU 11030.51.10.1/1V03X(TL)
Tier 1 Discount Amount
(41 x 30) x 1.5% = 18.45

Tier 2 Discount Amount
((41 x 30) - 41.4) x 1.5% = 18.17325
Rounded = 18.17

Total Tier Discount Amount
18.45 + 18.17 = 36.62

Total Discount Tier 1 + Discount Tier 2 for bundle packs product
82.18 + 36.82 = 118.8

Total Bundle Packs Discount - Total Bundle Packs Product Tier 1 & 2 Discount = Total Bundle Pack Discount Minus Tier Discount
 199.5 - 118.8 = 80.7

Total Bundle Pack Discount Minus Tier Discount + Total Tier Discount = Overall Discount
256.96 + 80.7 = 337.66

So the overall calculation for order number #000000233
Subtotal - Overall Discount (Tier 1 + Tier 2 + Bundle Packs) = Grand Total
8630 - 337.66 = 8292.34