Try our conversational search powered by Generative AI!

Discount is not Working Properly


I have updated the episerver

commerce core to 10.2.1

commerce also 10.2.1.

Episerver Framework 10.3.1


Now if I am working with discount the resulted discount is not coming properly.

Discount: Get Cheapest For Free

Buy at least X items from catalog entries, get the cheapest Y for free.

I gave value for

Buy at least...


  • X items


 From these entries


Get cheapest Y for free


Promotion code


The discount is successfully applied but not visible any effect.


I have tried in Quick Silver where versions are

commerce core to 9.12.2

commerce also 9.24.1

Episerver Framework 9.12.2


There I can find the result is all right.

What to do I can’t understand.

My project architecture is the copy architecture of Episerver Commerce Starter Kit .

The code I copied from quick silver is :-

ICart cart = _Cart;

                    var couponCodes = cart.GetFirstForm().CouponCodes;

                    IPromotionEngine _promotionEngine = ServiceLocator.Current.GetInstance();



                    var rewardDescriptions = cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings());

                    var appliedCoupons = rewardDescriptions.Where(r => r.Status == FulfillmentStatus.Fulfilled && !string.IsNullOrEmpty(r.Promotion.Coupon.Code))

                                                           .Select(c => c.Promotion.Coupon.Code);

                    var couponApplied = appliedCoupons.Any(c => c.Equals(code, StringComparison.OrdinalIgnoreCase));

                    if (!couponApplied)




Jan 16, 2017 9:27

"Not visible any effect"? what effect are you expecting to see that isn't there?

One thing off the top of my head is have you enabled VNext?

Described by Joel Yourstone at the end of this discussion:

The setting says it is for workflows but it affects things even if you aren't running any workflows.

It is a nice little caveat for people trying to get the promotions running. :)

Jan 16, 2017 16:50
* 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.