How to delete all orders in Magento

Unfortunately, magento default does not have option for delete order in Magento by default. there are over hundred orders leave in backend which make our sales confused. In this case, you can execute following SQL statements to delete the ALL orders in MySQL database:

<pre>TRUNCATE TABLE {prefix}sales_flat_order;
TRUNCATE TABLE {prefix}sales_order_tax;
TRUNCATE TABLE {prefix}downloadable_link_purchased;
DELETE FROM {prefix}eav_entity_store WHERE entity_type_id IN (SELECT entity_type_id FROM {prefix}eav_entity_type WHERE entity_type_code IN ('order', 'invoice', 'creditmemo', 'shipment'));</pre>

for more info visit mage-people

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: