This small HOWTO is aimed at web developers and is designed to solve the problem, with a launch of a new Magento stores have dozens of test orders, test calculations, etc. in the system. Tested
I have the script with a new version 1.4.1.0 Magento community.
All data without guarantee! In my case it worked without problems. Please do make a backup before always around here!
So now the script: can run the following sql
single script in phpmyadmin. This then empties relevant tables and sets the increment key back to 1
- Reset Magento TEST Data
SET FOREIGN_KEY_CHECKS=0;
-- reset dashboard search queriesTRUNCATE `catalogsearch_query`;ALTER TABLE `catalogsearch_query` AUTO_INCREMENT=1;-- reset sales order infoTRUNCATE `sales_flat_creditmemo`;TRUNCATE `sales_flat_creditmemo_comment`;TRUNCATE `sales_flat_creditmemo_grid`;TRUNCATE `sales_flat_creditmemo_item`;TRUNCATE `sales_flat_invoice`;TRUNCATE `sales_flat_invoice_comment`;TRUNCATE `sales_flat_invoice_grid`;TRUNCATE `sales_flat_invoice_item`;TRUNCATE `sales_flat_order`;TRUNCATE `sales_flat_order_address`;TRUNCATE `sales_flat_order_grid`;TRUNCATE `sales_flat_order_item`;TRUNCATE `sales_flat_order_payment`;TRUNCATE `sales_flat_order_status_history`;TRUNCATE `sales_flat_quote`;TRUNCATE `sales_flat_quote_address`;TRUNCATE `sales_flat_quote_address_item`;TRUNCATE `sales_flat_quote_item`;TRUNCATE `sales_flat_quote_item_option`;TRUNCATE `sales_flat_quote_payment`;TRUNCATE `sales_flat_quote_shipping_rate`;TRUNCATE `sales_flat_shipment`;TRUNCATE `sales_flat_shipment_comment`;TRUNCATE `sales_flat_shipment_grid`;TRUNCATE `sales_flat_shipment_item`;TRUNCATE `sales_flat_shipment_track`;TRUNCATE `sales_invoiced_aggregated`;TRUNCATE `sales_invoiced_aggregated_order`;TRUNCATE `sales_order_aggregated_created`;TRUNCATE `sendfriend_log`;TRUNCATE `tag`;TRUNCATE `tag_relation`;TRUNCATE `tag_summary`;TRUNCATE `wishlist`;TRUNCATE `log_quote`;TRUNCATE `report_event`;ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_invoice` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_invoice_comment` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_invoice_grid` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_invoice_item` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_order` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_order_address` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_order_grid` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_order_payment` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_order_status_history` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_shipment` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_shipment_comment` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_shipment_grid` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_shipment_item` AUTO_INCREMENT=1;ALTER TABLE `sales_flat_shipment_track` AUTO_INCREMENT=1;ALTER TABLE `sales_invoiced_aggregated` AUTO_INCREMENT=1;ALTER TABLE `sales_invoiced_aggregated_order` AUTO_INCREMENT=1;ALTER TABLE `sales_order_aggregated_created` AUTO_INCREMENT=1;ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;ALTER TABLE `tag` AUTO_INCREMENT=1;ALTER TABLE `tag_relation` AUTO_INCREMENT=1;ALTER TABLE `tag_summary` AUTO_INCREMENT = 1;ALTER TABLE `wishlist` AUTO_INCREMENT = 1;ALTER TABLE `log_quote` AUTO_INCREMENT = 1 ;ALTER TABLE `report_event` AUTO_INCREMENT = 1;
Usually one does not want the standard Magento use numbers for purchase orders and invoices. To change this you must first have each at least once placed an order and have the bill and to have generated the broadcast.
So then 3 rows in the table "eav_entity_store" created and you can customize the messages.
SET FOREIGN_KEY_CHECKS = 1;- like Set Own Order Prefix 201 000 315YOUR_DB_NAME UPDATE `` `` SET `eav_entity_store. increment_prefix `= '2 ',increment_last_id` `= '201000315' WHERE` `` eav_entity_store entity_store_id `= 1;.-- Set own invoice prefix like 201000315UPDATE `felgenkartons`.`eav_entity_store` SET `increment_prefix` = '2',`increment_last_id` = '201000315' WHERE `eav_entity_store`.`entity_store_id` =2;-- Set own shipping prefix like 201000315UPDATE `felgenkartons`.`eav_entity_store` SET `increment_prefix` = '2',increment_last_id `` = '201000315 'WHERE `` `eav_entity_store entity_store_id` = 3;.