Orders are numbered sequentially, starting at number "1" for a new installation of Ubercart. After testing your new installation you will probably want to reset the first order number to a different value - to pick up where your old e-commerce system left off, for example, or simply because single-digit order numbers give the wrong (or right?) impression to your customers.
Ubercart stores order numbers in the database. If you're using MySQL as your database, it's in a table called sequences in a row named uc_orders_order_id. You can use a tool like phpMyAdmin to alter the value stored in this row, or you can execute the following SQL. In this example, we will set the new starting order number to "1234":
UPDATE sequences SET id = 1233 WHERE name = 'uc_orders_order_id';Note that the next order placed will be one greater than the number stored in this table, so if we want to start at "1234" we set the column to be "1233".
Your new starting order number must be higher than any existing order numbers! If there is no row for this variable, it is recommended you create a test order so the order ID row gets set, then adjust it as described above.
If you're using PostgreSQL, the procedure is different. The order number is stored in a sequence called uc_orders_order_id_seq. To change the sequence value you need to use the following statement. Again, using "1234" as our desired starting order number:
SELECT setval('uc_orders_order_id_seq', 1233);This will update the uc_orders_order_id_seq sequence, and the numbering of new orders will start with the number following the one given as the second parameter.
In both cases, be sure to take your site off-line before you modify the database in this manner - you don't want to interfere with an order in progress!

