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

Try our conversational search powered by Generative AI!

Rounding problem when applying order discount before item discount

Found in

EPiServer.Commerce 11.2.6

Fixed in

EPiServer.Commerce 12.4.0

(Or a related package)

Created

Feb 12, 2018

Updated

Jul 09, 2018

State

Closed, Fixed and tested


Description

Reported from:
https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2018/2/promotion-calculating-in-commerce-marketing/#188075

  1. Go to the new Marketing UI.
  2. Create an order discount of the type "Spend at least X amount and receive a discount off total order value.":
    Spend at least X = 5.00
    Get the following discount (Amount off) = 1.00
  3. Create an Item discount with type "Buy at least X items from catalog entries and get related catalog entries at a discount.":
    Buy item X, get item X at (Amount off) = 1.00
  4. Set the priority of the order discount higher than the item discount.
  5. Add 3 items X (price = 11) to the cart and place the order.

Expected:
Item promotion 3, total discount 4, subtotal 30

Actual:
Item promotion 2.99, total discount 3.99, subtotal 30.01

  • Note: The bug does not happen if the item discount has a higher priority than the order discount.