Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add user email to order emails


Guest

Recommended Posts

Any idea how to have it add the customers email to the order email

that you receive when they purchase an item.

 

Instead of having to go on the website admin page and look it up for each customer?

Link to comment
Share on other sites

In checkout_process.php, find this code:

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

Change to:

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$email_order .= 'Ordered by: ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' ' . $order->customer['email_address'] . "\n\n";
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

This only affects the email you get, not the one the customer receives.

 

As always, it's a good idea to backup anything you edit BEFORE making the edits.

 

And in this case, "kick the tires" (order something) to be sure it works.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

In checkout_process.php, find this code:

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

Change to:

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$email_order .= 'Ordered by: ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' ' . $order->customer['email_address'] . "\n\n";
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

This only affects the email you get, not the one the customer receives.

 

As always, it's a good idea to backup anything you edit BEFORE making the edits.

 

And in this case, "kick the tires" (order something) to be sure it works.

:blush:

 

Your a pimp :)!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...