1 post tagged

order

Un-cancel Magento Order

If you want to restore canceled order in Magento and Magento 2 use the following SQL query. Order will be restored to “Pending” status.

SET @ORDERID = "40666";
UPDATE `sales_order`
SET `state` = 'new',
`status` = 'pending',
`base_discount_canceled` = '0',
`base_shipping_canceled` = '0',
`base_subtotal_canceled` = '0',
`base_tax_canceled` = '0',
`base_total_canceled` = '0',
`discount_canceled` = '0',
`shipping_canceled` = '0',
`subtotal_canceled` = '0',
`tax_canceled` = '0',
`total_canceled` = '0'
WHERE `entity_id` = @ORDERID;
SELECT * FROM `sales_order_item`
WHERE (`order_id` = @ORDERID)
;
Aug 20   mysql   order   sql