URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushp_general_purpose
Thread Number: 397
[ Go back to previous page ]

Original Message
"Field names in email receipt"

Posted by Ron [rverrazzani@earthlink.net] on at 08:30 PM
I was wondering if it is possible to have field names visible in the email receipts sent to the customer and me, the merchant.

When a customer fills in fields on the order form that I have added, such as "extra_field1" and "extra_field2," these values simply appear on the receipts with no field names, so the information appears arbitrary. Can I get the field names to appear?

ALSO ---

I, as the merchant, only need to receive the necessary information on the emailed receipt. I don't need to see the email message that I added in the General Settings/Email Notification area. This info is only for the customer.

Is there a way to remove this info on the emailed receipt that I recveive?


Table of contents

Messages in this discussion
"RE: Field names in email receipt"
Posted by Bill Weiner on at 06:21 AM
Both of your requests would require slight modifications to the uShop CGI script as described below:

-------------

INSTRUCTIONS ON HOW TO ADD FIELDS LABELS TO THE "EXTRA" FIELDS ON THE EMAIL RECEIPT

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:

$text .= $extra_field1 . "\n";

(This will get you to the place where the first "EXTRA" field is added to the receipt text.)

STEP 4: Add your label to that line accordingly by putting the label before the $extra_field1 as shown in the example below.

Example:

$text .= "My label: " . $extra_field1 . "\n";

STEP 5: Repeat for the other 4 EXTRA fields as necessary. (You should see the $extra_field2 - $extra_field5 lines a couple lines further down in the script.)

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

-------------

INSTRUCTIONS ON HOW TO HIDE THE EMAIL MESSAGE ON THE EMAIL NOTIFICATION SENT TO THE STOREOWNER

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

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

STEP 3: Do a search on the following line:

$receipt_text = &get_receipt_text("YES");

STEP 4: Change that line to:

$receipt_text = &get_receipt_text("NO");

STEP 5: Do a search on the following line:

# Send receipt to customer.

STEP 6: Immediately AFTER that line, add the following line:

$receipt_text = &get_receipt_text("YES");

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