www.uburst.com www.uburst.com

"change Order Number format?"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Programmer Tips
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"change Order Number format?"
Posted by Gary Lane on Jan-16-03 at 01:42 PM (EST)
There are three pre-stated formats available for the order number in the ushop-lib file.

is there any way to change the order number format to a new format? Specifically I would like to use YYYYMMDD-RRRRRRRRRRR as this would give me order numbers which are chronologically sortable.

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: change Order Number format?, Bill Weiner, Jan-17-03, (1)
Works a treat - thanks (no body), Gary Lane, Jan-17-03, (2)
Order Number Format, Sommay, Apr-03-03, (3)
RE: Order Number Format, Bill Weiner, Apr-09-03, (4)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: change Order Number format?"
Posted by Bill Weiner on Jan-17-03 at 06:30 AM (EST)
Below are instructions on how to modify the script such that the Order Number format is: YYYYMMDD-RRRRRRRRRRR

STEP 1: Make a backup of your ushop-lib.pl script...just in case.

STEP 2: Open your ushop-lib.pl script with any text editor such as WordPad.

STEP 3: Near the top of the script, make sure the $order_number_format setting is still set to the default setting of "1":

$order_number_format = 1;

STEP 4: Do a search on the following line:

$order_number = sprintf("%02d%02d%04d-%09d",$mon,$mday,$year,$random_number);

STEP 5: Change that line to:

$order_number = sprintf("%04d%02d%02d-%09d",$year,$mon,$mday,$random_number);

STEP 6: Save the script... as TEXT if your editor asks... and try it out!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "Works a treat - thanks (no body)"
Posted by Gary Lane on Jan-17-03 at 09:51 AM (EST)
Works a treat - thanks.
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "Order Number Format"
Posted by Sommay on Apr-03-03 at 10:18 AM (EST)
Can the MMDDYYYY be removed completely from the order number? However I still like to have the Date printed in the eMail boby
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "RE: Order Number Format"
Posted by Bill Weiner on Apr-09-03 at 05:46 AM (EST)
The order number format can be controlled by the following setting:

$order_number_format = 1;

Which is located near the top of the ushop-lib.pl script. Available values/formats are:

# 0 = RRRRRRRRR
# 1 = MMDDYYYY-RRRRRRRRR
# 2 = DDMMYYYY-RRRRRRRRR

You will probably want to change that setting to:

$order_number_format = 0;

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.