Add customers phone and email to the order confirmation email
multimixer | learn | Friday November 26 2010The 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 :)
Nice, thanks.
Thank you George. It’s really help.
related also with this topic, I would like to edit the content and translate the language on the confirmation email to customer, could you please info on which files the email format reside?
Also how to add the status on the order others than currently available. I want to add a status like ” Wait for Payment” How to do then?
The order confirmation email text is in file catalog/includes/languages/english/checkout_process.php , in case you have an other language, the path change accordingly
You can create as many order statuses as you like, this is in admin under localization>order status
is it possible chenge the email address from the default of owner ecommerce to customers email?
@botwin
I’m not sure what email address you want to change here