Implement freezePromotions for basic order modification admin flow #4223
dlhck
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
|
I am ready to submit a PR on this. But it would be great to hear from the vendure core team any concerns related to this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Post sale modification of an order is often required by webshop admins. Currently vendure ships a modify order detail component, where various order details can be changed:
These more often than not impact the order total. Easiest example is
orderLinechanges: more or less items on the order results in additional payment request or refunds. I think this is easy to understand, if a customer requests more items, then they can be expected to pay more as well.When a customer's address is changed, shipping method rates may also recalculate, or even just querying third party shipping rates API might give back different rate depending time of the day during order modifications.
To avoid this, we have checkbox recalculate shipping, to bypass order total changes.
What I think vendure misses right now for basic order admin flow, is the option to bypass order promotion recalculation as well. We can even find the option
freezePromotionsamong graphql options, but it is not used in the core code.I really like vendure's promotion system. Supports a ton of business goals, but with custom code. One thing is certain, that if a change happens to the order, it will trigger the
applyPriceAdjustmentsfunction. That function according to the docs applies taxes and promotions to the order.I think implementing
freezePromotionscan be easily done, but it can get tangled up with business goals, promotion terms & conditions. I assume that's why it wasn't implemented in the end.Situation 1.):
applyPriceAdjustments, the previously added promotion is removed and even though there was just an apartment number change request, the order totals changeIn situation 1.) I think it's clear to see that a checkbox to avoid promotion recalculation comes in handy.
Situation 2:
In situation 2.) it would be great to recalculate the promotion, but due to it being for a limited time, it's not possible for now. I don't say it's a problem, but I wanted to write a situation to highlight nuances of promotions set by shop owners.
On my vendure fork I have started the implementation, but I would like to invite others to share any ideas related to implementing the missing
freezePromotionsoption to give a smoother default experience for shop owners.kkerti@cc23616
Beta Was this translation helpful? Give feedback.
All reactions