Delete single order in magento using SQL query

Here is the query to delete single order in magento. All we need to do is just replace 'xxxxxxxxx' with your order_id and run it in phpMyAdmin. It works fine in Magento 1.4.x and 1.7.x version.
SET @orderId = 'XXXXXXXXX'; #replace this WITH your ORDER NUMBER
SET FOREIGN_KEY_CHECKS = 1;
DELETE FROM sales_flat_order
WHERE increment_id = @orderId;
DELETE FROM sales_flat_quote
WHERE reserved_order_id = @orderId;

Comments

Popular posts from this blog

Send email from xampp localhost

Modify item price in cart after placing order using sales_quote_add_item

Convert long url to short url using tinyurl api