AI OnAI Off
As far as i recall you can't, the promotion engine takes the customer information directly from the http/customer context.
I took the time and wrote up a feature request:
https://world.episerver.com/forum/developer-forum/Feature-requests/Thread-Container/2019/9/evaluate-prices-for-specific-customer-or-visitor-groups/
Please upvote it if you would like episerver to implement it. ^^
Hi
How can you calculate the discounted prices for a diferent customer group/price group?
private IEnumerable<DiscountedEntry> GetDiscountedPrices(ContentReference contentLink, IMarket CurrentMarket, IBaseContext context)
{
var promotionEngine = container
.With<PromotionEngineContentLoader>(container.With(context)
.GetInstance<CustomPromotionEngineContentLoader>())
.GetInstance<IPromotionEngine>();
return promotionEngine.GetDiscountPrices(
new[] { contentLink },
CurrentMarket,
CurrentMarket.DefaultCurrency,
referenceConverter,
lineItemCalculator);
}