November Happy Hour will be moved to Thursday December 5th.

Item Level Discount is not being applied while calculating Order level Discount

Vote:
 

Hello everyone,

    We made a custom order level discount processor as there was a business rule to exclude certain products from order level discount. But what we found out was while calculating the total amount of lineitems which are included in order level discount, item level discount of those line items are not being applied. 

Let's say we have a cart with 2 lineItems, Product A of price 10$(included in order discount/ Also have an individual 10% item discount), Product B (excluded from order discount). In our SpendAmountGetOrderDiscountCustomProcessor class, lineitem is 10$ but technically it should be 9$ (taking item level into consideration), so we are applying order level discount to 10$ instead of 9$. 

I need help to figure out a way to include item level discount while calculating order level discount. Any help would be appreciated.

Thanks,

Venkata

#200514
Edited, Jan 14, 2019 17:57
Vote:
 

Hi venkata,

I do not know what are you doing in SpendAmountGetOrderDiscountCustomProcessor class but if you want to customize calculating order level discount then you can new implemetation for IOrderFormCalculator, IOrderGroupCalculator - the method is used for calculating order level discount is GetOrderDiscountTotal.

Hope this help

#200585
Jan 17, 2019 4:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.