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_template buttons, and date format

Knowledge Base Lobby : uShop Support Conference : General Questions
Oct-24-17 07:03 AM EST
Original Message
Order_template buttons, and date format
Author Jan Swartling on 12-15-2000 at 13:04 (EST)
Before I ask some more questions I have to thank you for your excellent
and quick support. I think most of us can agree that this kind of free
support is getting sparse nowadays. Your answers to my earlier
questions solved the problems I had then.

Now for some new ones...

On the order_template where the customer choose how to pay (template 2?),
I have three buttons. I believe they are defined by the statement. Two of them are for different payment
options and the third is for print out. However, the print out button is
located between the other two. How can I change the order of the button on this
template.

And the last Q (for now)...

How to change the date format from MM/DD/YY to DD/MM/YY, or DD/MM/YYYY, or
even better DD/Januari (or whatever) /YYYY.

Thank you
Jan Swartling
Blue Soft
Sweden
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Order_template buttons, and date format Bill Weiner, 2000-12-15 13:26:33 (1)
            Order_template buttons, and date format Jan Swartling, 2000-12-17 12:35:16 (2)
                 RE: "Order_template buttons, and date format" Bill Weiner, 2000-12-18 06:26:55 (3)
                      RE: "Order_template buttons, and date format" Bill Weiner, 2000-12-19 07:05:30 (4)
                           "RE: "Order_template buttons, and date format"" Jan Swartling, 2000-12-20 13:23:01 (5)

Messages In This Discussion
         1. RE: Order_template buttons, and date format
        Author Bill Weiner on 12-15-2000 at 13:26 (EST)
Thanks for the nice compliments ... it's nice to hear that our support efforts are appreciated. Thanks! :^)

Anyway, in regard to your questions:

1) There is not really an easy way to configure the order of the payment buttons on that Review Order page, but here are some instructions on how to move the "Print Button" to the bottom:

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

STEP 2: Open the "ushop-lib.pl" file with any text editor such as WordPad.

STEP 3: Do a search on "sub get_review_page_buttons" in order to locate the start of the subroutine that generates the HTML for those buttons.

STEP 4: About 200 lines into that subroutine, you will see the following line:

if ($settings[37] =~ /yes/i)

Cut that line AND THE NEXT 14 LINES (15 lines total) and move them down about 31 lines... so that they get pasted immediately BEFORE the line:

$ret_html .= "< /TD > < /TR > < /TABLE > < /CENTER >";

STEP 5: Save the file (as TEXT if your editor asks)... and try it out!


2) In regard to changing the format of the date to be DD/MM/YYYY instead of MM/DD/YYYY, see my first posting here:

http://www.uburst.com/dcforum/ushop_cgi/117.html#1

That should explain how to modify the code until we specifically implement that different date format ourselves.
TABLE OF CONTENTS
                 2. Order_template buttons, and date format
                Author Jan Swartling on 12-17-2000 at 12:35 (EST)
Thank you,

all your suggestions worked as you said it would.

Ref. ushop-lib.pl

Regarding the change of the date format I just want to add that I found
three places that needed to be changed. Plus that I had to change the line
$order_date = sprintf("%02d/%02d/%02d",$mday, $mon+1,$year); to
...%02d/%02d/%04d... and remove or comment out the line above ($year
-=2000;) in order to get a 4 digit year on the order form when
reading it with the the Control Panel Order Reader.

If the line $year -=2000; were not commented out I just got a 2 digit year
reading.

Is there a reason you have a 2-digit year, or is this just a leftover from
1999.

Jan Swartling
Blue Soft
Sweden
TABLE OF CONTENTS
                         3. RE: "Order_template buttons, and date format"
                        Author Bill Weiner on 12-18-2000 at 06:26 (EST)
Thanks for the feedback.

In regard to finding a third date that needed to be changed, just make sure it wasn't the date in the "sub create_coupon_manager_form" subroutine. This is because I think that changing the format of the date of the coupon manager, would also require a couple additional logic changes for the coupon expiration dates to work properly. I'm not positive, so I'll have to double-check for you, but in the mean time, I would recommend leaving the date used by the coupon manager in the MM/DD/YYYY form....at least for now. (It's only seen by the store owner anyway)

In regard to getting rid of the "$year -= 2000" in the "display_review_order_form()" subroutine, so that the year is printed in the format YYYY.... Yes, that is a good change. We had originally left it in a 2-digit year format because some storeowners had some parsing programs that were looking for 2-digit years. But, yes, it would be fine to change that to a 4-digit year.
TABLE OF CONTENTS
                                 4. RE: "Order_template buttons, and date format"
                                Author Bill Weiner on 12-19-2000 at 07:05 (EST)
Just a follow up:

I looked over the code and found that changing the date format of the "create_coupon_manager_form" from a two-digit year to a four-digit year (as previously discussed)... is OK. The coupon expiration dates should still work fine.

The only place you shouldn't change the date format (at this time) is in the Affiliate Tracking "create_clear_log_form" subroutine...because changing the date format there could throw off the logic in the Affiliate Tracking "clear_log" subroutine.
TABLE OF CONTENTS
                                         5. "RE: "Order_template buttons, and date format""
                                        Author Jan Swartling on 12-20-2000 at 13:23 (EST)
Thank you Bill,

Your recommendations are noted. However, I don't use neither the Coupon routines, nor the Affiliate Tracking routines. But I make a note for future references.

Jan Swartling
Blue Soft
Sweden

TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.