Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Numbers


rmr

Recommended Posts

Hello. I have two questions:

 

1. Where do I change the starting number for the order numbers? I want the order numbers to start from something like order number "234" instead of "1".

 

2. How do I have the order number shown on the invoice/packing slip? I want to be able to print out the invoice/packing slip with the order number shown

 

Thanks in advance.

Link to comment
Share on other sites

1. I think that setting the initial order number is officially done in the installation screens. But a fairly easy way to do it at any time is to place a test order in your store. Then go into the database using phpMyAdmin and edit the order number for that order in the 'orders' table (if it is a live store, make sure your test order is still the latest order). The next order placed will increment from there. Once another order has been entered (either a real order or another test order), the altered test order can be deleted.

 

Someone may know another "cleaner" way to do it, but this method worked for me.

 

Note: Changing the order number of an order in the 'orders' table alone will break that order's linkage to other order related tables but since it is only a test order, no harm done.

 

 

2. I think this contribution will help you with the order number on invoice issue: http://www.oscommerce.com/community/contributions,2521

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Link to comment
Share on other sites

GraphicsGuy,

 

Thank you for the reply. I got inside phpmyadmin, clicked on the 'orders' table, but I dont know what to do next.... hehe....

 

Thank you also for the contribution. I will check it out right now.

Link to comment
Share on other sites

Once in phpMyAdmin, with the 'orders' table selected:

 

choose the "search" tab (or "select" tab, depending on version of phpMyAdmin)

 

On the resulting screen, enter the order number in the appropriate box and click "go" (Alternatively, you can click the browse tab and find your test order by browsing the list of orders)

 

On the resulting screen click the edit icon for the order row.

 

Then edit the order number and apply the change.

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Link to comment
Share on other sites

  • 3 weeks later...

The most effective way is to run the following code on your database via phpMyAdmin.

 

ALTER TABLE `orders` AUTO_INCREMENT = 500;

 

You can replace 500 with your desired value.

 

This method maintains the correct database integrity. :thumbsup:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...