cjmchch Posted March 29, 2007 Posted March 29, 2007 How can I change the order_id from strating at 1 to starting at 100001? Currently the auto incrementing order-id starts and build progressively from 1. I would like the start number to be of 6 digits so all invoices have a 6 digit number. I am not quite sure whether to do this by php or via mySQL changes. Any ideas or help would be appreciated thanks
b101aa2 Posted March 29, 2007 Posted March 29, 2007 Step 1. Add a product and make it inactive. This way it will not appear at all in teh store whatsoever. Just in the db. Step 2. In your mysql database itself, then change the product id to a much higher number. Step 3. Now change the product id's that are associated in descriptions and such to the same as the new one. OSC looks for the highest product id number assigned and each additional new product will thus have an incremental value above that.
b101aa2 Posted March 29, 2007 Posted March 29, 2007 oops. My bad. Order ID, not Product id. Same thing, just create a false order by you and then go into mysql itself and start changing all associated data of your test order id to a much higher number. Then, all following orders will proceed this.
usernamenone Posted March 29, 2007 Posted March 29, 2007 I don't think he is talking about product but the order # when selling a product. To chang the order number to a higher number you will have to have at least 1 product ordered in your shop. You log into your database and find that last order and it has to be the last order, you will just edit the order number to what ever you would like it to be. Then the next order will have the new higher order number. Step 1. Add a product and make it inactive. This way it will not appear at all in teh store whatsoever. Just in the db.Step 2. In your mysql database itself, then change the product id to a much higher number. Step 3. Now change the product id's that are associated in descriptions and such to the same as the new one. OSC looks for the highest product id number assigned and each additional new product will thus have an incremental value above that.
cjmchch Posted March 29, 2007 Author Posted March 29, 2007 I don't think he is talking about product but the order # when selling a product. To chang the order number to a higher number you will have to have at least 1 product ordered in your shop. You log into your database and find that last order and it has to be the last order, you will just edit the order number to what ever you would like it to be. Then the next order will have the new higher order number. Sometimes the simple things in life just go straight over the top. Thnaks for the help, site now fixed. Much appreciated.
Guest Posted March 29, 2007 Posted March 29, 2007 Sometimes the simple things in life just go straight over the top. Thnaks for the help, site now fixed. Much appreciated. I took a peek in MYPHP Admin and couldn't find it in my databse. Could you tell me where it is?
usernamenone Posted March 29, 2007 Posted March 29, 2007 http://www.oscommerce.info/kb/osCommerce/Tips_and_Tricks/31 More info is in there!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.