Page 1 of 1
how do you reset the order number?
Posted: Fri Aug 20, 2010 9:52 am
by johnseito
I made a couple of test orders so now is a bogus order number, how do you reset the order number? Thx
Re: how do you reset the order number?
Posted: Fri Aug 20, 2010 1:50 pm
by cevarief
Just execute sql query to empty your order table :
or you can alter it to reset the order_id field (autoincrement) to zero
Code: Select all
ALTER TABLE yourtableprefix_order AUTO_INCREMENT = 0;
The first order id inserted later will be 0.
It's always better you delete all order from backend to clean up order related table such as order history, order total etc and then reset the id by executing one of sql above.
Re: how do you reset the order number?
Posted: Fri Aug 20, 2010 9:37 pm
by johnseito
how do you go to the sql query to empty your order table
Re: how do you reset the order number?
Posted: Fri Aug 20, 2010 10:43 pm
by cevarief
If you have cpanel, you can use phpmyadmin, if you're in localhost you can download mysql frontend like heidisql and you can execute the sql code there.
To Q, what do you think if backend has some sort of placeholder/menu for this kind of utility stuff, so we can easily add some utility stuff created by oc users. Such as backup stuff, reset order id, empty cache which are not covered by oc yet or any other things.
Re: how do you reset the order number?
Posted: Sat Aug 21, 2010 8:26 pm
by johnseito
I don't know what I have and I don't even know how to get to what you just say. Which file is it or do I go to my web host??
Re: how do you reset the order number?
Posted: Mon May 28, 2012 1:42 pm
by oc_rich
Though this post is very old, came across it today via google search, after a bit of exploring the order related tables, came to this conclusion, may this info come handy for future seekers on the same subject
Fire the below sql using
http://www.adminer.org (installation of this tool on your server is pretty straight forward)
TRUNCATE TABLE `order`;
TRUNCATE TABLE `order_history`;
TRUNCATE TABLE `order_option`;
TRUNCATE TABLE `order_product`;
TRUNCATE TABLE `order_total`;
- Rich
Re: how do you reset the order number?
Posted: Wed May 30, 2012 10:12 am
by Klimskady
Decent info, thanks.
Re: how do you reset the order number?
Posted: Wed May 30, 2012 2:30 pm
by Avvici
oc_rich wrote:Though this post is very old, came across it today via google search, after a bit of exploring the order related tables, came to this conclusion, may this info come handy for future seekers on the same subject
Fire the below sql using
http://www.adminer.org (installation of this tool on your server is pretty straight forward)
TRUNCATE TABLE `order`;
TRUNCATE TABLE `order_history`;
TRUNCATE TABLE `order_option`;
TRUNCATE TABLE `order_product`;
TRUNCATE TABLE `order_total`;
- Rich
I think it's important to clarify that this is for emptying ALL ROW DATA in a table. There are two topics going on in this thread so I wanted to be sure that people aren't TRUNCATING to try and reset the Order_Id.