Add customers phone and email to the order confirmation email
multimixer | learn | Friday November 26 2010
The order confirmation email contains all kind of information except customers phone and email. What if you need to contact your customer? The only way to do this in osCommerce is, to go to the administration panel, search for the customer and retrieve the information from there.
Why do have it that complicated? Why not to have the information right in the email? Let’s add phone and email into the order confirmation mail, it’s a simple 2 step and straightforward task.
We know that the mail is getting generated in file catalog/checkout_process.php. The lines we need to edit in this file are in the “// lets start with the email confirmation” section. It all depends where in the mail we want the information to appear, lets say we need it to be under the “billing address”.
In this case we go to the lines
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
EMAIL_SEPARATOR . "\n" .
tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
Directly after hat we add
// BOF Multimixer 26 11 10 $email_order .= EMAIL_TEXT_CUSTOMER_TELEPHONE . ' ' . $order->customer['telephone'] . "\n"; $email_order .= EMAIL_TEXT_CUSTOMER_MAIL . ' ' . $order->customer['email_address']. "\n\n"; // EOF Multimixer 26 11 10
Basically we are done. Only thing we need to do now, is to add 2 more language definitions for the words “email” and “phone”. In file catalog/includes/languages/english/checkout_process.php add before the last ?>
// BOF Multimixer 26 11 10
define('EMAIL_TEXT_CUSTOMER_TELEPHONE', 'Telephone:');
define('EMAIL_TEXT_CUSTOMER_MAIL', 'email:');
// EOF Multimixer 26 11 10
Thats it ! Enjoy



Awesome! Thanks