Discount Order

Delford Chaffin asked on February 26, 2016 16:19

I have a volume discount on a product and a coupon code. It seems the coupon code is getting applied before the product volume discount.

In other words, this product is $5.50. If you buy 4 or more, you get $2.00 off each.

So, 4 x $3.50 ($5.50-$2.00) is $14.00. If you take the 10% coupon code now, you should have $12.60.

But what I am seeing is:

4 x $4.95 ($5.50-10%) is $19.80. Then, the volume discount removes $8.00 (4 x $2.00) and the total is $11.80.

Is there a way to change the order in which these discounts are applied?

Thanks!

Recent Answers


Trevor Fayas answered on February 26, 2016 18:34

You're probably going to need to over write one of the Providers, maybe the DiscountInfoProvider class.

Here's the article: https://docs.kentico.com/display/K9/Custom+Info+provider+example

This function may be it, but you may need to email support to get the correct one and it's logic (they can provide the source function logic so you can base your overwrite off of it)

public static double CalculateUnitDiscount( ShoppingCartItemInfo item, DiscountInfo discount, double basePrice = 0 )

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.