inventory
inventory copied to clipboard
In Store pickup from Admin area "Order saving error"
Preconditions (*)
- Magento 2.4.1
- PHP 7.4
- Percona 5.7
- Porto Theme (with my own child theme)
Steps to reproduce (*)
- Enable In Store pickup and add all required details to make this work
- Create an order from the admin area
- Add products to the order
- Add customer details
- Choose your in store pickup as the delivery method (In my case i have called in "Click & Collect"
- Select the required payment method. As i process some orders from the admin area on behalf of customers i have the Stripe payment module send an invoice or choose Bank Transfer
- Submit the order
Expected result (*)
- The order to be submitted successfully
Actual result (*)
- I didnt get a screenshot when it happened, but the error i got was
Order saving error: Warning: array_merge(): Expected parameter 2 to be an array, object given in /var/www/vhosts/clicksaveandprint.com/httpdocs/vendor/magento/module-inventory-in-store-pickup-sales-admin-ui/Plugin/Sales/Model/AdminOrder/Create/AdaptSetShippingAddressPlugin.php on line 31
I have a free delivery from admin module i have used before so that is the workaround i am currently employing, which works, but can confuse some customers with the delivery address being shown as their own, not the store location.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [*] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @alexsmith2709. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
I found this error in the browser console if this helps narrow down the issue:
scripts-mixin.min.js:4 Uncaught TypeError: Cannot read property 'then' of undefined at g.window.AdminOrder.setShippingMethod (scripts-mixin.min.js:4) at new <anonymous> (trigger-shipping-method-update.min.js:1) at Object.initComponent (layout.min.js:8) at fire (jquery.min.js:212) at Object.fireWith [as resolveWith] (jquery.min.js:218) at Object.deferred.<computed> (jquery.min.js:220) at fire (jquery.min.js:212) at Object.fireWith [as resolveWith] (jquery.min.js:218) at Object.deferred.<computed> [as resolve] (jquery.min.js:220) at layout.min.js:7
This seems to be the problem line:
this.loadArea(areas, true, data).then(function() { setStorePickupMethod(method === STORE_PICKUP_METHOD); });
Just wanted to chip in that I was also having this issue, but it is an issue with some js stripe placed on the page, as they did an override on the loadArea function but didnt return the result when calling the original.
Ive reported the issue to stripe as well.