Monday, January 24th, 2011
Delete test orders in Magento
In Magento there is no option for deleting orders in the admin panel. This is a problem when you want to delete those test orders that you made in development before going live. Here I will show you which tables you have to look for to delete those test orders.
Remember it is always a good idea to backup your db as it will delete all the details regarding the test sales you made.
Compatibility:
Applicable to Magento version 1.4.X
DELETE FROM `sales_flat_order`; TRUNCATE TABLE `sales_flat_invoice`; TRUNCATE TABLE `sales_flat_invoice_comment`; TRUNCATE TABLE `sales_flat_invoice_grid`; TRUNCATE TABLE `sales_flat_invoice_item`; TRUNCATE TABLE `sales_flat_order`; TRUNCATE TABLE `sales_flat_order_address`; TRUNCATE TABLE `sales_flat_order_grid`; TRUNCATE TABLE `sales_flat_order_item`; TRUNCATE TABLE `sales_flat_order_payment`; TRUNCATE TABLE `sales_flat_order_status_history`; TRUNCATE TABLE `sales_flat_shipment`; TRUNCATE TABLE `sales_flat_shipment_comment`; TRUNCATE TABLE `sales_flat_shipment_grid`; TRUNCATE TABLE `sales_flat_shipment_item`; TRUNCATE TABLE `sales_flat_shipment_track`; TRUNCATE TABLE `sales_payment_transaction`;
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.



Pingback: Moving Magento from development to production | IWebUX