Order numbers not getting reset

I am running ver 2.1.3. I had around 7000 orders in my database which I have deleted and also set the initial order ID as 1 in the administrator settings but still the order nos. are being generated from the order # 7001.:confused:

Has anyone faced the same problem?

use phpMyAdmin to change the auto-increment value to 1. It will at least give you the error if any.

[quote name=‘tbirnseth’]use phpMyAdmin to change the auto-increment value to 1. It will at least give you the error if any.[/QUOTE]

Thanks. :stuck_out_tongue: Sorry for sounding a noobie but where do I see the auto increment value in phpMyadmin? I do see the Cs_cart_order tables.

On the Operations tab. On the left side in the box labled Table Options you see an AUTO_INCREMENT label with a text box. The value is the last AUTO_INCREMENT value used.

I believe the admin panel does NOT let you go backward so it must be done directly in the DB.

Go to



Backup one table "cscart_orders "

Download and open backed up .sql file with text editor that handles large text files, used EditPad Lite



CREATE TABLE cscart_orders (


Delete every “INSERT INTO cscart_orders”

Save, upload and restore .sql



Now go to



“Initial order ID value” set to “1”

If db will contain at least one line of “INSERT INTO cscart_orders” this “Initial order ID value” will not take any effect.

@darius - That method is fraught with problems… Take for instance an order_id of 10 that exists in the system. There will be corresponding info in order_details, order_data and several other tables.

So now when the new system hits the new order 10, there is a high liklihood that the data from the old order 10 will be mixed with the new. Possibly payment info, product options and even products.

Unless you can identify all the tables (and the serialized data within those tables that reference order id’s then just deleting the elements in the orders table could cause major (and difficult to figure out) problems down the road.

Yea you may be right, I did not looked too much in to it.