Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing starting order number?


mushindo

Recommended Posts

Have a client who wishes to have their order numbers being over say #2000.

 

Does anyone have a suggestion of how we could change the orders/ invoices starting number from 1, to say 2000? Not sure where or how we would accomplish this.

 

Thanks in advance! :)

Sincerely,

Bruce

 

19 contributions submitted

Link to comment
Share on other sites

If you go into all the tables with the 'order_id' field make the default 2000

 

eg from

 

orders_id int NOT NULL auto_increment,

 

to

 

orders_id int(8) DEFAULT '2000' NOT NULL auto_increment,

[/code]

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

Thanks for the tip.

 

I did attempt what you proposed, but without any success.

 

While it was easy enough within any of the orders_x tables, when I attempted to do it for the order_id orders table, it would say the change was made, but then when i refreshed in phpmyadmin, it did not show the default value of 2000.

 

Any other ideas? Anyone?

Sincerely,

Bruce

 

19 contributions submitted

Link to comment
Share on other sites

I did it for the following tables

 

orders

orders_products

orders_products_attributes

orders_status_history

orders_total

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

if its a new install try deleting the orders table and running the sql with the modification for only the orders table

 

[/code]

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

when I attempt this with the products table, it says it successfully changed it, but still the default 2000 field doenst change.

 

here is another error I am getting. When I try to change the orders_products table it says this:

 

Incorrect table definition; There can only be one auto column and it must be defined as a key

 

Any clues?

Sincerely,

Bruce

 

19 contributions submitted

Link to comment
Share on other sites

yeah if the orders_id field wasnt originally auto increment dont make it an auto increment field. Just add in the default '2000' bit to all the order_id fields nothing more.

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

As always, make a backup first.

 

Got this off one of the topics here, but could not find it again so will try and get it right. Seams to be working for me (MS2)

 

myphpadmin or equivelent

 

browse all tables beginning with Order except orderstatus (Ignore the ones you can't browse anyway)

 

update the entries that show current order number to show the new start number. In some tables it was only one field, in others it was 2 fields.

 

Sorry I can't be more exact (neither was the original post), but it looks like it has done the job for me.

 

Also, it would be useful if you could report back with success/failure etc. for future ref....

 

Zuber

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...