Magento2Msp icon indicating copy to clipboard operation
Magento2Msp copied to clipboard

Undo cancel does not work due to getItemsCollection (magento 2.2.6)

Open lennartbee opened this issue 8 years ago • 4 comments

When a customer uncancels an order the order status remains 'pending' due to the orderitems that are still canceled. This happens in Magento 2.2.6. For some reason saving the orderitems in Connect.php does not work in combination with getItemsCollection. As a workaround I replaced line 1134 of Connect.php with: foreach ($order->getAllVisibleItems() as $item) { After this, the order items save again on uncancel. I do not know the exact difference with getItemsCollection and how this will affect uncancels with parent/child products.

lennartbee avatar Oct 22 '18 12:10 lennartbee

I would not advise using getAllVisibleItems as it would only show parent products. https://github.com/magento/magento2/blob/2.2/app/code/Magento/Sales/Model/Order.php#L1361

Seems to be caused by the additional save at https://github.com/MultiSafepay/Magento2Msp/blob/1.6.1/Model/Connect.php#L1128 We're looking into this, but removing the save at line 1128 should also solve this.

Jasper-MultiSafepay avatar Oct 22 '18 13:10 Jasper-MultiSafepay

We're experiencing this as well, we have to manually set qty_canceled and tax_canceled to 0 in the sales_order_item table to get rid of the canceled status for order items.

royvanos avatar Oct 23 '18 11:10 royvanos

This issue is solved in the current release 1.6.2 Could you perform an update of our plugin?

Jasper-MultiSafepay avatar Oct 23 '18 13:10 Jasper-MultiSafepay

As this issue is solved in release 1.6.2 we will close this ticket.

JonkRuud avatar Nov 09 '18 12:11 JonkRuud