Just execute sql query to empty your order table :
or you can alter it to reset the order_id field (autoincrement) to zero
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.
Code: Select all
TRUNCATE yourtableprefix_order;
Code: Select all
ALTER TABLE yourtableprefix_order AUTO_INCREMENT = 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.
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.
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.
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
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.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
Who is online
Users browsing this forum: No registered users and 95 guests