AbanteCart Community

Shopping Cart Operations => Support => Topic started by: Amarbir on February 03, 2013, 10:34:50 PM

Title: Order Management - > Reset order and invoive number
Post by: Amarbir on February 03, 2013, 10:34:50 PM
Hi Folks  ,
            Please Take a Example  .

1 : I have a product Called " A" And qty i have is 5 units  .Someone places a order and buy 1 unit .On checking qty decreased to 4 .His order status is processing .If i cancel his order and change state to cancelled .Then also qty remains 4 does not come back to 5 .If i physically delete order then also qty remains 4 WTH ?

2 : I would like to ask that if i would like the invoice and orders from start from 1 again how to do this please ? .
Title: Re: Order Management - > Reset order and invoive number
Post by: abantecart on February 04, 2013, 03:22:13 AM
1. Good observation. Stock management is a tricky part. I think we will try to add restocking feature into core in next release.

2. For order # you need to reset table accoutrement for orders to start from 1. This needs to be done in your Mysql database.

ALTER TABLE ac_orders AUTO_INCREMENT = 1;
NOTE; ac_orders might be different on your database and you need to delete all records from the table first.

For invoice #, once you delete all orders from above table you can set invoice # to start from 1 in admin -> settings -> checkout.
Title: Re: Order Management - > Reset order and invoive number
Post by: abantecart on February 05, 2013, 04:11:22 AM
Coming back on item #1. Conceptually it is not very simple to handle stock return. This will require implementation of RMA extension.
It is based on the policy how each merchant handle stock management.
If you cancel the order and stock is returned to the total count, and later you decide to complete the order. What should happen? There is a lot to validate here and it can be a mess.
Clean way to do this is implementing RMA and return process will handle stock return to total.

Any thoughts?
Title: Re: Order Management - > Reset order and invoive number
Post by: ItsAGr8Day on April 12, 2013, 08:55:39 PM
Not to sound like the newbie that I am, but how do you get to the MySql to edit the order #s.  I have never done that before - only editing in cpanel and php.
Title: Re: Order Management - > Reset order and invoive number
Post by: smallfish on April 12, 2013, 11:03:00 PM
You should find the phpmyadmin in your cPanel. Then open the database and find out the "orders" table and at the right hand side, you will find the "management" tab. and set auto_increment=1.
or input the above SQL command in the "SQL" tab.
or clear the table "orders", then all records delete and auto_increment reset to 1.


Not to sound like the newbie that I am, but how do you get to the MySql to edit the order #s.  I have never done that before - only editing in cpanel and php.
Title: Re: Order Management - > Reset order and invoive number
Post by: smallfish on April 12, 2013, 11:12:51 PM
You should define some "Order status" which can't be deleted by user (ie, Paid, Shipped or Completed and let admin define when to reduce the inventory by the status (Paid, Shipped or completed).  (but also need to allow admin to create custom status.)
If the order is cancelled (status=cancelled), then restore the inventory. If there is no setting for reduce inventory and restore inventory, then abantecart will not handle the inventory. Then we can handle the inventory manually. This is more flexible.

Coming back on item #1. Conceptually it is not very simple to handle stock return. This will require implementation of RMA extension.
It is based on the policy how each merchant handle stock management.
If you cancel the order and stock is returned to the total count, and later you decide to complete the order. What should happen? There is a lot to validate here and it can be a mess.
Clean way to do this is implementing RMA and return process will handle stock return to total.

Any thoughts?