Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Do I get Customers EMAIL address in Email orders?


Guest

Recommended Posts

When we get the order from OSCommerce titled: Order Process

 

It has almost all the information I need EXCEPT the customers Email adddress.

I have to login into the admin area into orders and then pull up thier order # in order to get thier email address.

 

What file do I need to modify and what code do I need to add to get that in with the email we get?

 

I know it has to be somehting simple. well maybe.

Link to comment
Share on other sites

Go into your catalog/checkout_process.php

 

Make a copy of that file as a backup, in case something goes wrong.

 

Now, my file is heavily modded, so I can't really tell you what line to go to, or even if this will work for you, but nearer the bottom of the page you'll see:

 

 

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" .

 

 

If you want the name and email address in your emails, REPLACE the last line in the above code with:

 

$email_order = "Hello " . $order->customer['firstname'] .  " at " .  $order->customer['email_address'] . "\n" .

 

 

Hope this helps.

Link to comment
Share on other sites

Thanks, as this is similar what I ended up doing in \catalog\checkout_process.php

 

added:

EMAIL_SEPARATOR . "\n" .

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

EMAIL_SEPARATOR . "\n" .

 

so it looks like this below:

 

// 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_SEPARATOR . "\n" .

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

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

 

So it comes back in an email order like this:

 

< - snip ->

...

 

Order Number: 6322

Detailed Invoice: https://.../catalog/account_history_info.php?order_id=6322

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

Email Address [email protected]

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

Date Ordered: Thursday 25 January, 2007

 

...

< - snip ->

 

I already get the persons name in the email as it shows me thier address, just needed thier email.

 

 

Works great, thanks !!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...