Magento eCommerce: How To Reset All Test Order Information and Set Unique Prefix For Orders, Invoices, Shipments, and Credit Memos
About: How To Reset Test Orders, Dashboard Information, and Set Unique Starting Values for Orders, Invoices, Shipments, and Credit Memos Who’s Interested: Informative to the technical gurus What: Plug ‘n Play Database Script that runs queries to customize after store is installed and product(s) have been created Magento Version Relevence: 1.1.6 Magento Store Setup: Single-Store Setup A client of ours went in to test products, orders, invoices, etc. to get the feel for the overall “purchase order to shipment” process from start to finish. After creating many test users, orders, etc. - they now desire to have everything reset back to “0” (zero). Not only that, but they also want to separate the prefixes for the following items just for ease of dissimilarity when using the Magento ADMIN tools:
- Orders (set prefix to begin with “1”)
- Invoices (set prefix to begin with “2”)
- Shipments (set prefix to begin with “3”)
- Credit Memo’s (set prefix to begin with “4”)
- Find “YOUR_DB_NAME” down below and change to match your database name (though leave the ticks “)
- Copy and paste code into SQL manager (PhpMyAdmin or similar) and then run the query
- Feel free to Create test order, invoice, shipment, and credit memo’s via the ADMIN (easier than going through order process on frontend)
- Once you like the changes you see, go back and run the same SQL query …the following will now be in effect:
- All data pertaining to orders and search terms (Dashboard) are reset to 0 (zero)
- Order number prefix with 0, Invoice number prefix with 2, Shipment number prefix with 3, Credit Memo number prefix with 4