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

Original Message
"Email format"

Posted by Patrick [kriptap@candw.ky] on at 00:14 AM
When the email is set out to confirm the order it is very plain in it's address. I would like to add just before each line the field that it responds to: example;

My name
14 This Road
This Town
Phone: 345 917 7465
Fax: 345 945 1234
Email: me@me.com

I would like it to read:


Name: My name
Address: 14 This Road
Town: This Town
City: Gt
State: GT
Zip: 78654
Country: USA
Phone: Phone: 345 917 7465
Fax: Fax: 345 945 1234
Email: Email: me@me.com

I know where to change this but I don't know how to write the whole line, example:

This is the line:
$text .= $customer_shipping_name . "\n";

How would it read with the name before it so it reads like above.


Table of contents

Messages in this discussion
"Customizing the uStorekeeper e-mail receipt"
Posted by Microburst Support Team [support@uburst.com] on at 10:42 AM
If the output line is exactly
$text .= $customer_shipping_name . "\n";

then changing it to be exactly
$text .= "Name: " . $customer_shipping_name . "\n";

would precede the customer shipping name with the text "Name: " as you require.

(or you could write it exactly like this, note that there is a difference: )
$text = $text . "Name: " . $customer_shipping_name . "\n";

Posted by Patrick [kriptap@candw.ky] on at 12:08 PM

"Ummm... where do you change this?"
Posted by Clark [clark@freshwebproduce.com] on at 03:09 PM
I would like to do this as well. Where do I make the changes? And can I just add the label to the fields that don't have it and not to the fields that already have a label? (phone, fax, etc...)


"RE: Ummm... where do you change this?"
Posted by Bill Weiner on at 10:38 PM
The format of the emails is controlled by the "get_receipt_text" subroutine in the "ushop-lib.pl" file. Open that file with any text editor and do a seach on "sub get_receipt_text" to get to the start of that subroutine. You should be able to recognize where the fields are being output.

"one more thing..."
Posted by Clark [clark@freshwebproduce.com] on at 03:12 PM
Can I break up the name into
First Name:
Last Name:


I'd like to do this at least in the customer log file but the email would be nice too.


"RE: one more thing..."
Posted by Bill Weiner on at 10:33 PM
The customer log already does keep the customer's first name and last name separate. Now, if you want to just add the labels to the the customer log entries, then you can do that by modifying the "update_customer_log" subroutine in the "ushop.pl" script.

You should be able to see how to modify that subroutine. For example, change the line:

print CUST_LOG $billing_last_name . "|";


print CUST_LOG "Last Name: " . $billing_last_name . "|";

Is that what you wanted to do?