Developer forum

Forum » Development » Expired discounts are being applied to orders after upgrading

Expired discounts are being applied to orders after upgrading

Zayar Minn Dynamicweb Employee
Zayar Minn
Reply

We are currently facing an issue about expired discounts are being applied to orders after upgrading.

Expired discounts are being applied to orders after an application upgrade from version 9.3.15 to 9.14.9. This issue occurs with existing carts created before the upgrade but does not affect newly created carts after the upgrade.

For example:

1. ORDER1001 was created with items on 2023-12-01.
2. The application was upgraded on 2023-12-07.
3. Discount-A, valid until 2023-12-10, was applied to ORDER1001 placed on 2023-12-20.
4. ORDER1002, created on 2023-12-20, did not have the Discount-A issue when placed on 2023-12-21.

May I have regarding the possible causes of this issue. Thanks.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Zayar

Can you check what the OrderPriceCalculationDate on the said order object is? If it is not null, the timestamp in that column controls the discounts applied.

BR Nicolai

Votes for this answer: 1
 
Zayar Minn Dynamicweb Employee
Zayar Minn
Reply

Hi Nicolai,
The OrderPriceCalculationDate is old date. If that is the issue, is there any setting to recalculate or should I do ForcePriceRecalculation(order)?

Thanks.

 
Zayar Minn Dynamicweb Employee
Zayar Minn
Reply

Thanks.
OrderPriceCalculationDate = null solved it.

 

You must be logged in to post in the forum