Jump to content

Order number!


Recommended Posts

I want to make the system to auto-get a order number as following:

For example:
Order Number: GE081005-01

As 'GE' is just for shop, '08' for the ordering year 2008, '10' for the ordering month (Oct),if it is less than 10, then use 09, 08, 07 etc......., '05' for the ordering date, and the last '01' is for the No. 1st order on 2008-10-5

thanks for your help in advance!!!!!!!

Link to comment
Share on other sites

Rod, I for one can't think of a way to do it directly.

The order id is currently auto-incremented in the database, and as such is a purely numeric field - one that's fundamental to the core database/application logic. I guess that you could create another field in the order table, which is a generated order reference number in the format you want, but you'd need to then add custom code whenever the order number is used for display (as that is all this would be used for).

Paul

Link to comment
Share on other sites

×
×
  • Create New...