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
Duplicate printing of NAME

Knowledge Base Lobby : uShop Support Conference : Programmer Tips
Dec-11-17 02:34 AM EST
Original Message
Duplicate printing of NAME
Author garylane on 09-17-2002 at 11:33 (EST)
When I'm doing a PRINT ORDER or a RECEIPT, the information generally spans a couple of pages. I want to be able to print the CUSTOMER NAME a second time on the same page (just below the basket) to help track faxed pages that may get separated. How would I go about doign this?
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Duplicate printing of NAME Bill Weiner, 2002-09-18 03:32:51 (1)
            "RE: Duplicate printing of NAME" Les, 2002-09-18 06:29:09 (2)
                 Nearly there. Les, 2002-09-18 07:46:24 (3)
                      RE: Nearly there. Bill Weiner, 2002-09-18 19:42:15 (4)
                           "RE: Nearly there." Les, 2002-09-19 04:06:56 (5)

Messages In This Discussion
         1. RE: Duplicate printing of NAME
        Author Bill Weiner on 09-18-2002 at 03:32 (EST)
Below are instructions on how to modify the ushop-lib.pl file such that the customer name is added a second time at the bottom of the "Print" order form:

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:

sub display_print_order_form

(This will get you to the start of the subroutine that outputs the PRINT order form.)

STEP 4: About 14 lines into that subroutine, locate the following line:

$order_footer = &get_cart_html();

... and immediately AFTER that line, add this line:

$order_footer .= "< BR > $billing_first_name $billing_last_name < BR >"

(The above line should all be on one line - not wrap around to a second line. Also, there should NOT be spaces around the two "BR" HTML tags in that line.)

STEP 5: Save the script... as TEXT if your editor asks... and try it out!
TABLE OF CONTENTS
                 2. "RE: Duplicate printing of NAME"
                Author Les on 09-18-2002 at 06:29 (EST)
Thanks Bill,

i've copied the code as you said (removed the spaces etc. and added a ; after the closing " otherwise I get an Internal Error) and there are NO internal error's, which is good, but the customers name does NOT appear on the print out. Shouls there be an instruction comment added to the order page where we want the customers name to appear?
TABLE OF CONTENTS
                         3. Nearly there.
                        Author Les on 09-18-2002 at 07:46 (EST)
Bill we have the code set out as $order_footer = "$billing_first_name"; on the very line AFTER the $order_footer = &get_cart_html(); line and we ARE getting the name print out now BUT now the basket doesn't get displayed, if we move the above code BELOW the $order_form_html =~ s//$order_footer/g; line then the basket gets displayed but the name doesn't.

Regards

Les
TABLE OF CONTENTS
                                 4. RE: Nearly there.
                                Author Bill Weiner on 09-18-2002 at 19:42 (EST)
It looks like you are missing the "." before the equal sign. Instead of using:

$order_footer = "$billing_first_name";

use

$order_footer .= "$billing_first_name";

The ".=" means to append that onto the $order_footer value...rather than overwrite it.
TABLE OF CONTENTS
                                         5. "RE: Nearly there."
                                        Author Les on 09-19-2002 at 04:06 (EST)
Nice one Bill, that's done the trick.

Thanks

Les
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.