Add customers phone and email to the order confirmation email

multimixer | learn | Friday November 26 2010

order confirmation

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 :)

Click +1 to recommend this to your friends when they search.


follow multimixer on Twitter

Follow me on twitter. I'm not tweeting all day long and guaranteed no spam and no advertising.

If you like what you read and if you think it will help you in your online business, then please consider a donation.

There is no obligation to do so and all information provided here is free to use.

It will however help to keep this blog alive, free of advertising and full of content.

  • Cameron 10/11/2011 at 20:58

    Awesome! Thanks :)

  • Frank 24/04/2013 at 16:45

    Nice, thanks.

  • bunhin 24/05/2013 at 11:40

    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?

    • multimixer 27/05/2013 at 07:41

      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

  • botwin 06/05/2014 at 19:17

    is it possible chenge the email address from the default of owner ecommerce to customers email?

    • multimixer 07/05/2014 at 12:10


      I’m not sure what email address you want to change here