Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Exception in IPromotionEngine.GetDiscountPrices if one variation has no price

Found in

EPiServer.Commerce 10.1.1

Fixed in

EPiServer.Commerce 10.4.0

(Or a related package)

Created

Jan 25, 2017

Updated

Mar 07, 2017

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Create a variation without a price.
2. On that variation, call

IPromotionEngine.GetDiscountPrices(new List<ContentReference> { variation.ContentLink }, market, market.DefaultCurrency, _referenceConverter, _lineItemCalculator); .

3. A null reference exception is thrown.

Reported from here:
http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/1/promotionengine.getdiscountprices-throws-nullrefexception-commerce-10.1.1/