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

Try our conversational search powered by Generative AI!

IPromotionEngine.Run returns inconsistent results if condition items differ from target items

Fixed in

EPiServer.Commerce 11.7.0

(Or a related package)

Created

Jan 04, 2018

Updated

Jan 19, 2018

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce:

  1. Create a SpendAmountGetItemDiscount promotion.
  2. Configure it to be active now and for all visitor groups without a coupon code.
  3. Configure the condition so that the customer has to buy at least 200 in your currency.
  4. Add a set off Variants X to the reward and give them a 25% discount.
  5. Create a new variant Y or edit an existing one that is NOT included in set X.
  6. Give the variant Y a price of 195. (Anything between 190 and 199.99 should reproduce this.)
  7. Write a test that calls the IPromotionEngine's Evaluate method.
  8. Pass in a content reference to Y and the market and currency for which you have set up prices and RequestFulfillmentStatus.PartiallyFulfilled
  9. The Evaluate method will say that your promotion is partially fulfilled for Y, which is expected.
  10. Change the price of Y to 205.
  11. Run Evaluate again.
  12. Evaluate returns NotFulfilled

Reported from:
https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2018/1/bug-promotion-evaluation-of-spendamountgetitemdiscount-gives-false-positives/