Tuesday, May 29, 2012

Magento deleting an order

It have been some argument about able to cancel or delete a processed or shipped or completed order.
But by end of the day, there are reasons that people want to delete the order.
Be it by mistake, or due to testing the order.

I finally found a extension which works with magento 1.6.2, but it does not cover properly for 1.6.2.
http://www.magentocommerce.com/magento-connect/seamless-delete-order.html

So i ended up altering the module block to support it.
http://www.mercstudio.net/assets/files/EM_DeleteOrder-1.0.5.tar.gz


But due to the nature of the reporting in magento, its not possible to delete the cached reports in the database using this extension.
It can only be deleted based on date, but becareful with this procedures.
The reporting tables for sales order are:
sales_order_aggregated_created
sales_invoiced_aggregated_order
sales_refunded_aggregated
sales_refunded_aggregated_order
sales_shipping_aggregated

Please note that i do not responsible for any data lost in the extension. So do the original developer himself. Please remember to backup your database in system > tools > backup before applying this extension and deleting any order.

No comments: