Magento Development: Delete Orders, Reset Dashboard

Delete Orders

Found this great extension that does it. I’ve used it on EE 1.12, and from the reviews I gather it works on CE 1.7.0.2 as well. YMMV, use with caution, etc. I can’t imagine installing this in anything other than a development environment.  Seamless Delete Order.

Reset Dashboard Statistics

To remove “Bestsellers” from my dashboard, I add this stored procedure to my development MySQL environments, courtesy of this post at PHP Bugs.

DROP PROCEDURE IF EXISTS reset_dashboard;
delimiter //
CREATE PROCEDURE reset_dashboard()
BEGIN
  TRUNCATE sales_bestsellers_aggregated_daily;
  TRUNCATE sales_bestsellers_aggregated_monthly;
  TRUNCATE sales_bestsellers_aggregated_yearly;
  DELETE FROM report_event WHERE event_type_id IN (SELECT event_type_id FROM report_event_types WHERE event_name IN ('catalog_product_view'));
END //
delimiter ;

The DELETE FROM report_event code I stumbled across shortly after I originally posted this. I found it here at DesignersSandBox.

Facebook comments: