Closed lennartbee closed 6 years ago
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.
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.
This issue is solved in the current release 1.6.2 Could you perform an update of our plugin?
As this issue is solved in release 1.6.2 we will close this ticket.
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.