Deleting orders

Can someone point me in the right direction as to where in the database (phpmyadmin) will I find order id to delete order. The reason being i get double orders by accident sometimes and when i delete the duplicate order in admin it doesn’t update the invoice numbers on the next order. So if I delete order #102 it goes but the next order is #103 and it misses re invoicing #102.

Hope that makes sense.


I don’t think it would make any difference. When it deletes in admin, it’s deleted from the database as well. Even the 102. Which just means that even if you did it manually, it would still move on to 103.

The order tables in CS Cart have an auto-increment field for the order id. When an order is placed, the database increments to the next number automatically. Even if you delete a order number, a new order will not re-use the deleted number. This is for database preservation and is a standard behavior of MySQL.

If you are absolutely sure you’ve deleted the “bad” orders from the 3 below order tables, (and there are no orders with a order id higher than your desired order number), run the following commands on your database (replace with your next desired order number):

ALTER TABLE `cscart_order_data` AUTO_INCREMENT =;
ALTER TABLE `cscart_order_details` AUTO_INCREMENT =;