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
order number

Knowledge Base Lobby : uShop Support Conference : General Questions
Oct-23-17 03:01 PM EST
Original Message
order number
Author M Ulm on 09-05-2002 at 12:35 (EST)
I would like to shorten the date part of the order number to just ddmmy with the y being the last digit of the year. I would also like to remove the "-" from the middle.
Thanks
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: order number Bill Weiner, 2002-09-06 04:01:39 (1)
            RE: order number Joe Banks, 2002-12-23 23:04:12 (2)
                 RE: order number Bill Weiner, 2002-12-24 06:31:50 (3)

Messages In This Discussion
         1. RE: order number
        Author Bill Weiner on 09-06-2002 at 04:01 (EST)
To change the format of the date used for the order number to the format that you describe, here are some steps to customize the uShop CGI script:

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

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

STEP 3: Do a search on the following line:

if ($order_number_format == 0)

STEP 4: Change that section of code from:

if ($order_number_format == 0)
{
$order_number = sprintf("%09d",$random_number);
}
elsif ($order_number_format == 1)
{
$order_number = sprintf("%02d%02d%04d-%09d",$mon,$mday,$year,$random_number);
}
else
{
$order_number = sprintf("%02d%02d%04d-%09d",$mday,$mon,$year,$random_number);
}

To:

$year = $year - 2000;
if ($order_number_format == 0)
{
$order_number = sprintf("%09d",$random_number);
}
elsif ($order_number_format == 1)
{
$order_number = sprintf("%02d%02d%d%09d",$mon,$mday,$year,$random_number);
}
else
{
$order_number = sprintf("%02d%02d%d%09d",$mday,$mon,$year,$random_number);
}

(You basically add the "$year = $year - 2000;" line and change two "sprintf" lines.)

STEP 5: Save the script... as TEXT if your editor asks... and try it out!
TABLE OF CONTENTS
                 2. RE: order number
                Author Joe Banks on 12-23-2002 at 23:04 (EST)

> (You basically add the "$year = $year - 2000;" line and change two "sprintf" lines.)

HMM- IS THIS Y3K COMPLIANT?
TABLE OF CONTENTS
                         3. RE: order number
                        Author Bill Weiner on 12-24-2002 at 06:31 (EST)
Given that this is only to achieve the format that he wants for the order number (ddmmy), it's not critical. But he can deal with that when Y3K comes around :^)
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.