Update order from admin path, as admin user and from CLI cause errors.

Created on 20 April 2023, about 1 year ago

Situation:
- user created an order
- product prices is different from the user preferred currency
- currency is converted

Now admin updates an order for any reason (like changing workflow state or adding new items from UI) - mismatch currencies exception, as shouldCurrencyRefresh checks if this is admin route and also ordered owner is mismatched. I suspect same issue may appear when order updated form CLI (like a drush command that will add new order item to the order) and all other cases mentioned in shouldCurrencyRefresh.

Looks like we need one more order processor for that to handle such cases, in addition to CurrencyOrderProcessor
the new one should also process currencies, but not based on $this->currentCurrency->getCurrency() but based on the currency of the "total price" of the order. And it should be triggered when $this->shouldCurrencyRefresh() is FALSE.

🐛 Bug report
Status

Active

Version

1.61

Component

Code

Created by

🇺🇦Ukraine gilmord 🇺🇦Ukraine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024