Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add text to order confirmation e-mail?


Guest

Recommended Posts

Posted

I searched everywhere but I can not find where I can add some text to the order confirmation e-mail sent to the customer.

 

Can anyone help?

 

Thanks..........Mel

  • Replies 69
  • Created
  • Last Reply
Posted

Look in /catalog/checkout_process.php for the line:

 

// lets start with the email confirmation

  • 1 year later...
Posted

:lol: I have the same question. I found the line referred to in the checkout_process.php file, but now what?

 

I want to modify the verbage in the email body...

Posted

Look in catalog/includes/languages/english/checkout_process.php

 

All text , for every page you can find in languages directory

  • 3 months later...
Posted

>_<

 

um... glad i found this as it is what i'm looking for... only thing now... how the heck do i add fields to the catalog/checkout_process.php page?

 

i am no good at php :( here's what i need to do:

 

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

 

1. i need to add the STORE_NAME & the EMAIL_TEXT_ORDER_NUMBER to the Subject line of the email sent.

 

2. i need to add the customers phone number in the order.

 

3. i need to add the customers email address in the order email.

 

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

 

how can i do this? i hope someone can help me with this :thumbsup:

  • 2 weeks later...
Posted

I have the same question. I have look in catalog/checkout_process.php but nothing happend when I edit..

Posted

isnt there anyone out there who can help us?

 

 

how the heck do i add fields to the catalog/checkout_process.php page?

 

i am no good at php sad.gif here's what i need to do:

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

 

1. i need to add the STORE_NAME & the EMAIL_TEXT_ORDER_NUMBER to the Subject line of the email sent.

 

2. i need to add the customers phone number in the order.

 

3. i need to add the customers email address in the order email.

 

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

Posted
isnt there anyone out there who can help us?

 

It should add the name of the store to the subject when you change this in

the checkout_process.php file:

 

define('EMAIL_TEXT_SUBJECT', 'Order Process '. STORE_NAME);

Posted

hiya digitalhuman.... thanks for that - i got it working... any idea how i can add the order number to the subject line?

i tried this:

 

define('EMAIL_TEXT_SUBJECT', STORE_NAME . ' - Order No: ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id );

 

but it didnt work :P it came out like this: 'Magnetic Mattress Covers - Order No: EMAIL_TEXT_ORDER_NUMBER'

 

then i need to add the customers phone number & email address in the order email....

  • 3 weeks later...
Posted

Along this same line: How do I add the customer's email address to the information contained in the confirmation email? It shows the delivery and billing address, but no email address. Would also like to see the customer's phone number there too.

 

Anyone can help?

Posted
Along this same line:  How do I add the customer's email address to the information contained in the confirmation email?  It shows the delivery and billing address, but no email address.  Would also like to see the customer's phone number there too.

 

Anyone can help?

 

Did you guys ever figure this out? I need to add the customer email address and phone number to the Order Process email as well.

Posted

this is what i did:

 

catalog/checkout_process.php: (from the line '//lets start.....'

 

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" . 
                EMAIL_SEPARATOR . "\n" . 
                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments']) {
   $email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
                 EMAIL_SEPARATOR . "\n" . 
                 $products_ordered . 
                 EMAIL_SEPARATOR . "\n";

 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
   $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
 }

 if ($order->content_type != 'virtual') {
   $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
                   EMAIL_SEPARATOR . "\nemail: " .$order->customer['email_address']. "\nTelephone: ".$order->customer['telephone']."\n".
                   tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\nemail: " .$order->customer['email_address']. "\nTelephone: ".$order->customer['telephone']."\n".
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
     
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
                   EMAIL_SEPARATOR . "\n";
   $payment_class = $$payment;
   $email_order .= $payment_class->title . "\n\n";
   if ($payment_class->email_footer) { 
     $email_order .= $payment_class->email_footer . "\n\n";
   }
 }

 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT." order:".$insert_id, $email_order, 

STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

catalog/includes/languages/english/checkout_process.php: (everything)

 

<?php
/*
 $Id: checkout_process.php,v 1.26 2002/11/01 04:22:05 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('EMAIL_TEXT_SUBJECT',  ' - Your Order from ' . STORE_NAME);
define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');
define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:');
define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:');
define('EMAIL_TEXT_PRODUCTS', 'Products');
define('EMAIL_TEXT_SUBTOTAL', 'Sub-Total:');
define('EMAIL_TEXT_TAX', 'Tax:        ');
define('EMAIL_TEXT_SHIPPING', 'Shipping: ');
define('EMAIL_TEXT_TOTAL', 'Total:    ');
define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Delivery Address');
define('EMAIL_TEXT_BILLING_ADDRESS', 'Billing Address');
define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method');

define('EMAIL_SEPARATOR', '------------------------------------------------------');
define('TEXT_EMAIL_VIA', 'via');
?>

 

this will result in the following:

 

Subject: - Your Order from Costless Vitamin order:15 (subject line of email)

 

Costless Vitamin

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

Order Number: 15

 

Detailed Invoice:

https://www.costlessvitamin.com/catalog/acc...php?order_id=15

 

Date Ordered: Wednesday 12 January, 2005

 

Products

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

1 x Wobenzym N 800 Tablets (wobenzym800) = $77.99

Coating Clear Coating

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

Sub-Total: $77.99

UPS Ground (UPS): $7.99

Total: $85.98

 

Delivery Address

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

email: [email protected]

Telephone: 0800-customers-phone-no-555

Customers Name

13422 Wright Dr

Guerneville, CA 94432

United States

 

Billing Address

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

email: [email protected]

Telephone: 0800-customers-phone-no-555

Customers Name

13422 Wright Dr

Guerneville, CA 94432

United States

 

Payment Method

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

Payflow Pro

 

 

 

hope this helps!

Posted

This looks great! I will give it a try. Thank you!

Posted
Did you guys ever figure this out?  I need to add the customer email address and phone number to the Order Process email as well.

 

 

Yes, here is how to add your customer email and phone number to the order email:

 

 

My solution is:

 

\catalog\checkout_process.php orig.

 

CODE

 

if ($order->content_type != 'virtual') {

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";

}

 

 

 

 

\catalog\checkout_process.php modif.

 

CODE

if ($order->content_type != 'virtual') {

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_MAIL . $order->customer['email_address'] . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $sendto, 0, '', "\n") .

EMAIL_TEXT_PHONE . $order->customer['telephone']. "\n";

}

 

 

 

 

In more, the following lines, must be added

 

\catalog\includes\languages\(your language)\checkout_process.php

 

CODE

define('EMAIL_TEXT_MAIL', 'Email: ');

define('EMAIL_TEXT_PHONE', 'Telephone: ');

Posted

I'm trying to find out how to edit the email sent to the customer when they place an order.

 

Specifically, I need to add a line right under the "order number" line at the top of the email which includes a hyperlink. something like...

 

"Thanks for your order. Now the only thing left to do is design your project. CLICK HERE TO DESIGN YOUR LAYOUT."

 

 

Thanks in advance!

  • 2 weeks later...
Posted

I'm have trying to add customers_dob (Date of Birth) under email but it just be a blank line.

 

Anyone can help me?

Posted

Thanks. I have used these suggestions to work on my emails. Does anyone know why I am getting this in my customer order emails? I am also getting the text version and the html unformated version in all the emails.

 

X-Mailer: osCommerce Mailer

 

Content-Type: multipart/alternative;

 

boundary="=_0d13351a7c6908387bf28058a596cea9"

 

Message-Id: <[email protected]>

Date: Tue, 8 Feb 2005 21:53:28 -0800 (PST)

 

 

--=_0d13351a7c6908387bf28058a596cea9

 

Content-Type: text/plain; charset="iso-8859-1"

 

Content-Transfer-Encoding: 7bit

Posted

Ive been trying to add to my confirmation email - with info about the terms and conditions link and also link to our returns policy. Ive edited the languages file and then ive added to the checkout_process.php like so:

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" . 
                EMAIL_SEPARATOR . "\n" . 
                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
    EMAIL_TEXT_RETURNS_URL . ' ' . tep_href_link(FILENAME_SHIPPING) . "\n\n" .
    EMAIL_TEXT_CONDITIONS_URL . ' ' . tep_href_link(FILENAME_CONDITIONS) . "\n\n" .
                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

 

But... the confirmation email still has the same info in it and does not print the returns (shipping) or the terms and conditions links..

 

Any ideas ?

 

Is there any other files that the email info is being sent from ??

 

thanks

mark

Regards

Mark Brindle

Posted

Mark,

 

In the /languages/english/checkout_process.php file create the variable EMAIL_TEXT_CONDITIONS and fill in your Ts and Cs there. Something like this:

 

define('EMAIL_TEXT_CONDITIONS', 'If you use this piece of code on your OsCommerce implementation you owe DaniGirl168 a big thank you. All information is given as-is and DaniGirl168 disclaims all responsibility for any cock ups you may make while implementing this. In your version replace this text with your Ts and Cs just watch you do not enter any special characters that will break the php string');

 

Then in your other checkout_process.php file, look for this line:

 

  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
                   EMAIL_SEPARATOR . "\n";

 

Modify it to look like this:

  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
EMAIL_SEPARATOR . "\n"
EMAIL_TEXT_CONDITIONS . "\n"                    
EMAIL_SEPARATOR . "\n";

 

Not the cleanest way of fixing this problem, but it works! I accept gratfulness donations by paypal :P

 

Best regards,

Dani

There are 3 types of people - those who can count, and those who can't.

Posted
this is what i did:

 

catalog/checkout_process.php: (from the line '//lets start.....'

 

// lets start with the email confirmation
?$email_order = STORE_NAME . "\n" . 
? ? ? ? ? ? ? ? EMAIL_SEPARATOR . "\n" . 
? ? ? ? ? ? ? ? EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
? ? ? ? ? ? ? ? EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
? ? ? ? ? ? ? ? EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
?if ($order->info['comments']) {
? ?$email_order .= tep_db_output($order->info['comments']) . "\n\n";
?}
?$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
? ? ? ? ? ? ? ? ?EMAIL_SEPARATOR . "\n" . 
? ? ? ? ? ? ? ? ?$products_ordered . 
? ? ? ? ? ? ? ? ?EMAIL_SEPARATOR . "\n";

?for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
? ?$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
?}

?if ($order->content_type != 'virtual') {
? ?$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
? ? ? ? ? ? ? ? ? ?EMAIL_SEPARATOR . "\nemail: " .$order->customer['email_address']. "\nTelephone: ".$order->customer['telephone']."\n".
? ? ? ? ? ? ? ? ? ?tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
?}

?$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
? ? ? ? ? ? ? ? ?EMAIL_SEPARATOR . "\nemail: " .$order->customer['email_address']. "\nTelephone: ".$order->customer['telephone']."\n".
? ? ? ? ? ? ? ? ?tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
? ? ?
?if (is_object($$payment)) {
? ?$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
? ? ? ? ? ? ? ? ? ?EMAIL_SEPARATOR . "\n";
? ?$payment_class = $$payment;
? ?$email_order .= $payment_class->title . "\n\n";
? ?if ($payment_class->email_footer) { 
? ? ?$email_order .= $payment_class->email_footer . "\n\n";
? ?}
?}

?tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT." order:".$insert_id, $email_order, 

STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

catalog/includes/languages/english/checkout_process.php: (everything)

 

<?php
/*
?$Id: checkout_process.php,v 1.26 2002/11/01 04:22:05 hpdl Exp $

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2002 osCommerce

?Released under the GNU General Public License
*/

define('EMAIL_TEXT_SUBJECT', ?' - Your Order from ' . STORE_NAME);
define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');
define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:');
define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:');
define('EMAIL_TEXT_PRODUCTS', 'Products');
define('EMAIL_TEXT_SUBTOTAL', 'Sub-Total:');
define('EMAIL_TEXT_TAX', 'Tax: ? ? ? ?');
define('EMAIL_TEXT_SHIPPING', 'Shipping: ');
define('EMAIL_TEXT_TOTAL', 'Total: ? ?');
define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Delivery Address');
define('EMAIL_TEXT_BILLING_ADDRESS', 'Billing Address');
define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method');

define('EMAIL_SEPARATOR', '------------------------------------------------------');
define('TEXT_EMAIL_VIA', 'via');
?>

 

this will result in the following:

 

Subject: - Your Order from Costless Vitamin order:15 (subject line of email)

 

Costless Vitamin

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

Order Number: 15

 

Detailed Invoice:

https://www.costlessvitamin.com/catalog/acc...php?order_id=15

 

Date Ordered: Wednesday 12 January, 2005

 

Products

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

1 x Wobenzym N 800 Tablets (wobenzym800) = $77.99

Coating Clear Coating

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

Sub-Total: $77.99

UPS Ground (UPS): $7.99

Total: $85.98

 

Delivery Address

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

email: [email protected]

Telephone: 0800-customers-phone-no-555

Customers Name

13422 Wright Dr

Guerneville, CA 94432

United States

 

Billing Address

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

email: [email protected]

Telephone: 0800-customers-phone-no-555

Customers Name

13422 Wright Dr

Guerneville, CA 94432

United States

 

Payment Method

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

Payflow Pro

 

hope this helps!

 

 

Is there a way for the folowing link to redirect you to :

Detailed Invoice:

http://www.costlessvitamin.com/catalog/acc...php?order_id=15

instead of

Detailed Invoice:

https://www.costlessvitamin.com/catalog/acc...php?order_id=15

Posted
Is there a way for the folowing link to redirect you to :

Detailed Invoice:

http://www.costlessvitamin.com/catalog/acc...php?order_id=15

instead of

Detailed Invoice:

https://www.costlessvitamin.com/catalog/acc...php?order_id=15

 

Hmmm, what's the difference between those links? They both look the same to me. Clarify what's up.

 

Danielle x

 

Ooops sorry! Editing my original post now coz I see what's up - one is http, the other https. That wasn't that obvious!

 

catalog/checkout_process.php: (from the line '//lets start.....') look for this line, you can see where it is calling SSL:

 

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .

 

Dx

There are 3 types of people - those who can count, and those who can't.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...