Posted on October 6, 2009 2 comments
Learn how to setup a live development environment using CodeKit & LESS.
Discover how to add a Media Queries toggle button to your site using jQuery.
Having Magento problems? This solution may help get you up and running again!
Learn how to make Polaroid-style images complete with 3D shadows using only CSS.
Discover how to make your own 3D box using gradients and shadows with the power of CSS.
The problem is that in-development stores need testing; to do that properly, you need to push test orders fully through the system, from invoice to completion.
The first thing you need to bear in mind is that, whilst this is possible using a load of MySQL queries, that kind of thing on a working site is pretty scary and risky if you're not sure what you're doing. For this reason, I would recommend purchasing the Yireo extension Delete Any Order which will do the job for you. It will also scan the database for orphaned sales data and remove, something which would take significant time by hand.
The extension costs a mere EUR20 and is worth it just for the piece of mind. Whatever you choose, please ensure you backup your database first.
Once you've purchased the extension, upload it to the root of your Magento site.
This will give you an additional option in System->Tools called "Delete Any Order". Select it to run the extension.
If you are preparing a store for launch and want to remove all orders and reset the sales reference numbers, select all orders and choose the "Delete" option from the drop-down menu (top-right).
You don't really want your new store starting orders, invoices, shipment and credit memos from some random number do you? Do the following to reset these counters to the default (1000001).
1. Use PHPMyAdmin to view your database.
2. Click the "SQL" tab.
3. Paste the following query into the code entry window:
TRUNCATE `eav_entity_store`; ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1; SET FOREIGN_KEY_CHECKS=1;
4. If all goes well, the system will display a message stating that the query was a success.
The next order placed will now use the default number to start.
I recommend testing these steps out on a test site rather than your live environment, if that's possible – just so that you are comfortable with the steps before deploying on a live site.
Previous: Calling all Joomla! Developers…
Next up: Moving a Magento Installation
Maria - July 22, 2015 at 12:41 pm
Thank you sharing your experience on how to tackle problem in database. For those who do not have any idea about running that queries, there is one more useful extension to remove orders. You can download free version of Store Manager for Magento
Julie - April 25, 2016 at 4:19 am
Thank you so much for a very detailed instruction to delete order in magento admin
Although I’m not specified in IT, it’s easy to follow and make it successful