Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Ah, just found this:
http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/1/promotionengine.getdiscountprices-throws-nullrefexception-commerce-10.1.1/
Hi!
I am trying to get a list of all promotions that an entry using this line of code:
But this gives me a null reference exception:
[NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.] EPiServer.Commerce.Marketing.Internal.PromotionEngineContentLoader.CreateInMemoryOrderGroup(ContentReference entryLink, IMarket market, Currency marketCurrency) +322 EPiServer.Commerce.Marketing.PromotionEngine.Evaluate(IEnumerable`1 entryLinks, IMarket market, Currency currency, RequestFulfillmentStatus requestFulfillmentStatus) +275 EPiServer.Commerce.Marketing.IPromotionEngineExtensions.GetDiscountPrices(IPromotionEngine promotionEngine, IEnumerable`1 entryLinks, IMarket market, Currency marketCurrency, ReferenceConverter referenceConverter, ILineItemCalculator lineItemCalculator) +782 Dr.Core.Controllers.Pages.ProductController.Index(DRProduct currentContent, String variationCode, String configurationCode, Boolean quickview, Boolean wishlistView) +2324
Any idea why?
Are there any other way to get all promotions for an entry?
I am using workflows with Commerce 10.3
/Kristoffer