inventory icon indicating copy to clipboard operation
inventory copied to clipboard

In Store pickup from Admin area "Order saving error"

Open TectonicKestrel opened this issue 4 years ago • 3 comments

Preconditions (*)

  1. Magento 2.4.1
  2. PHP 7.4
  3. Percona 5.7
  4. Porto Theme (with my own child theme)

Steps to reproduce (*)

  1. Enable In Store pickup and add all required details to make this work
  2. Create an order from the admin area
  3. Add products to the order
  4. Add customer details
  5. Choose your in store pickup as the delivery method (In my case i have called in "Click & Collect"
  6. 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
  7. Submit the order

Expected result (*)

  1. The order to be submitted successfully

Actual result (*)

  1. 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”.

TectonicKestrel avatar Feb 16 '21 19:02 TectonicKestrel

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


m2-assistant[bot] avatar Feb 16 '21 19:02 m2-assistant[bot]

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); });

TectonicKestrel avatar Apr 08 '21 09:04 TectonicKestrel

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.

LyraGhost avatar Oct 07 '21 15:10 LyraGhost