Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all articles
Browse latest Browse all 9642

Duplicate Line Item gets added on Applying discount

$
0
0

Extension Method in EPiServer.Commerce.Order.IOrderGroupExtensions

ApplyDiscounts(this IOrderGroup orderGroup, IPromotionEngine promotionEngine, PromotionEngineSettings settings);

When this method is called on order object it is adding duplicate line item and removing the other line items. This is the case only when If you have created a Discount/Promotion and has Product in the `This discount does not apply to these catalog items` list. Then if you have that product addedf in cart along with other products in that case above specified method add's duplicate line item.

Example:- Suppose you have Product A in excluded list and Product A and Product B in cart then on Applying discount you will have two products and both will be Product A.

Because of this we are getting an exception of duplicate line item. I guess it should not have added duplicacy and either provide error or apply discount only to Product B as per example case.


Viewing all articles
Browse latest Browse all 9642

Trending Articles