November Happy Hour will be moved to Thursday December 5th.

Optimize promotion engine for discount evaluation

Fixed in

EPiServer.Commerce 13.25.0

(Or a related package)

Created

Jul 23, 2020

Updated

Dec 19, 2023

State

Closed, Acceptance tests pass


Description

Displaying discount prices on a product listing uses the same logic as evaluating promotions on a cart, basically running the promotion engine with a virtual cart containing one item. It will run through all the steps of evaluation, including filtering for redemption limits etc.

In order to improve this mechanism, to get discounted prices for product listing, a cache has been added to IPromotionEngine extension methods (IPromotionEngineExtensions) so that it reduces loads from the database.