Hi
i have multi vendor 4.15.2, clean without any added addons.
At changing an existing order via the rest API like quantity amount, the promotions are not updated.
I have a promotion set up when buying more than 3, it works fine on the website directly, it also works fine when creating an order using the API, but not when updating an existing order.
For example, if I create an order with a quantity of 2 and update it to 4 - the discount is not given, and vice versa, if the customer purchased 4 and received the discount and then I update the quantity with the API to 2 - the discount remains
TY
checked
Hello!
It is not only the API that does not reapply the promotions to the existing orders, but also the admin panel which works exactly the same way.
You can change this behaviour by changing the value of the tweak do_not_apply_promotions_on_order_update
in config.local.php from true
to false
. However, let me warn you that this is not recommended and may cause unpredictable behaviour as this functionality is outdated and hasn’t been tested in literally years.
Hello, I have the same problem. I need to automate the removal of products from order and then recalculate promotions. Also using multi vendor. What is the recommended way of doing that?
Please check my previous message.
Thanks, I read that ( do_not_apply_promotions_on_order_update
in config.local.php). But you wrote that it is not recommended. I thought there is a recommended way.
Promotions are intentionally not recalculated when editing an order. This behavior was introduced to avoid multiple issues caused by automatic recalculation in earlier versions.
Since version 4.5.1, the previous logic was moved under the do_not_apply_promotions_on_order_update
tweak in config.local.php
. This tweak is no longer maintained or tested during development, and its behavior is considered deprecated. As a result, enabling it may lead to unexpected or unstable behavior, which is why we do not recommend using it.