Jump to content

Is that any counter of order?


Saxon

Recommended Posts

Hi all, 

I am new from community, but I have search related topics about delete order of version 1.6 that said not recommend delete order directly, and some recommend use delete order free module. But those not work for me, I tried to delete order manually, let say my current latest id_order is 122, I delete it manually, but after I create a new order , the new id_order still increase to 123, not 122 again. The following are what I have tried:

1.Delete data from Mysql of following tables

ps_cart, ps_cart_cart_rule, ps_cart_product, ps_orders, ps_order_carrier, ps_order_detail, ps_order_history, ps_order_invoice, ps_order_invoice_payment, ps_order_message, ps_order_payment

 

2. directly delete using delete module or delete button added through override AdminOrderController.php

http://127.0.0.1/PS/admin/index.php?controller=AdminOrders&deleteorder&token=9991234455u8uu5i5u5i4u5545oi&id_order=122

 

3. delete order free module

 

Could anyone tell me how to make a correct id_order after I have delete the old order?

 

Moreover, could anyone teach me how to reset order that start from 1? Thank you very much 

Link to comment
Share on other sites

35 minutes ago, Rolige said:

Hello,

You need update also the AUTO_INCREMENT of the table, if you want it to continue in the id 122, try executing this query:


ALTER TABLE `ps_orders` AUTO_INCREMENT = 122;

 

 

Regards!

Thank you very much Rollge! It's really work! I forgot to check this point!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...