Jump to content

order id, starting from a custom number?


Recommended Posts

Hello all

 

I need to start the order id from a specific and custom number. For example I don't want my first order start from 1, but from, say, 255344... I don't seem to find anywhere to do this. I know that i can do this for Invoice (starting from a custom number)

 

anyone got this to work? I appreciate any help...

 

Ed

Link to comment
Share on other sites

  • 2 weeks later...

I suppose all those numbers come from auto-increase fields in the MySQL database. So if you would go to your database with phpMyAdmin and manually enter an order with number 255344 then the next time PS enters an order for which it relies on the autoincrease you would get 255345.

 

This requires some experimenting but as far as I can see PS doesn't offer you an out-of-the-box solution.

Link to comment
Share on other sites

Should work by changing the auto increment value for the ps_order in the database

Worked in my PS 1.4.6.2 at least, but remember to back the shit up before testing! :)

ALTER TABLE  `ps_orders` AUTO_INCREMENT =255344;

Change "255344" to whatever number you like.

 

Regards

Max

  • Like 2
Link to comment
Share on other sites

  • 6 months later...

Good Morning,

 

I am not sure if I have misunderstood the post by Hokaro but surely the easiest way to do this is:

 

Go to Back Office > Orders > Invoices sub-tab > scroll down the page to Invoice Options > Invoice Number

 

You can do the same for Delivery slips

 

Hope this helps

 

Paul

Link to comment
Share on other sites

Well, if you want that BOTH invoice AND order number are same, you should both of these steps:

  1. Go to Back Office > Orders > Invoices sub-tab > scroll down the page to Invoice Options > Invoice Number
  2. Optional: You can also change index number for delivery slips by going to delivery slips options in BO.
  3. Do this in your database. You can select any number you want. Please backup your DB if you don't want to break anything.
    	ALTER TABLE  `ps_orders` AUTO_INCREMENT =255344;
    


There is also an index for cart number but as far as I know, customer can't see his/her cart number in any situation. That's why there's no need to change that.

Edited by Lerpsu (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...