uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
change Order Number format?

Knowledge Base Lobby : uShop Support Conference : Programmer Tips
Nov-18-17 03:30 AM EST
Original Message
change Order Number format?
Author Gary Lane on 01-16-2003 at 13:42 (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.
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: change Order Number format? Bill Weiner, 2003-01-17 06:30:36 (1)
            Works a treat - thanks (no body) Gary Lane, 2003-01-17 09:51:08 (2)
                 Order Number Format Sommay, 2003-04-03 10:18:55 (3)
                      RE: Order Number Format Bill Weiner, 2003-04-09 05:46:54 (4)

Messages In This Discussion
         1. RE: change Order Number format?
        Author Bill Weiner on 01-17-2003 at 06:30 (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!
TABLE OF CONTENTS
                 2. Works a treat - thanks (no body)
                Author Gary Lane on 01-17-2003 at 09:51 (EST)
Works a treat - thanks.
TABLE OF CONTENTS
                         3. Order Number Format
                        Author Sommay on 04-03-2003 at 10:18 (EST)
Can the MMDDYYYY be removed completely from the order number? However I still like to have the Date printed in the eMail boby
TABLE OF CONTENTS
                                 4. RE: Order Number Format
                                Author Bill Weiner on 04-09-2003 at 05:46 (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;
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.