Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to include customer email address in order confirmation


BuddahBoy

Recommended Posts

Posted

In addition to the info included in the email confirmation, I'd like to add the customer email like the other info included [address, phone, name, etc.]

 

thank you for assistance - very much appreciate the ongoing help

 

Ron

Posted

If you are talking about when the customer has created an account....

 

you could do something like:

 

in catalog/creat_account.php find this

	  $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

 

put this just under it

	  $email_text .= "\n\n" . 
  $firstname . $lastname . "\n" . 
  $street_address .  "\n" . 
  $city . ", " . $state . " " . $postcode . "\n" .
  $telephone . "\n\n";

Posted

I miss read your post....

 

To change the email that comes after the order is made in checkout_process.php:

this example will add the telephone number just under the name and address.

 

Find

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 

change to:

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n" . 
				$order->customer['telephone'] . "\n";
 }

Posted

Thanks Jeff - but actually it is the email address that I want to add to the order confirmation. My solution would be just as described but it's the email that I need to add, not the phone number - sorry I was not clear in my original post - was a very very long day!

 

I'm not very proficient in php - what would the included be for the email, please. I greatly appreciate the assistance.

 

All the best

Ron

Posted

Ron,

To add the telephone # under the address - It would be:

 

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n" .
				$telephone . "\n";
 }

Posted

"to add the telephone # under the address - It would be:"

 

Sorry for not writing clearly, but it's the email address that I'd like to add not the phone number - apologies . . . "it's me, not you" LOL!

 

thanks

Posted

Funny, I posted the same thing again...I'm getting old

 

To add the email address try:

 

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n" .
				$email_address . "\n";
 }

Posted

Thanks for taking the time Jeff - getting old??? Bahhh - humbug

 

I did try your suggestion but it is not passing on the email address - appreciate the attempt to help me out.

 

All the best

Ron

Posted

Ron,

We'll get it...try this:

 

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n" . $order->customer['email_address'] . "\n\n";
 }

Posted

Hey Jeff - BINGO!

 

thanks alot! I decided to try it this AM after some long needed sleep LOL - works like a charm, thanks much for taking the time to help me out - I hope to be in a position to reciprocate or at least hope that this info will serve someone else along the way.

 

Thanks again

 

Ron

Posted

Hi Jeff - if you're still following this thread, I answered too quickly it appears! The notification email to the customer does include the email address as desired, right under the delivery address - thanks for that; but, the problem is that after inserting that variable, the only order confirmation email being sent out is to the customer - the admin copies are not sent out. Tested it without the variable again just to be sure and that was indeed the case - any thoughts?

 

Thanks again

Ron

Posted

Hi Jeff - if you're still following this thread, I answered too quickly it appears! The notification email to the customer does include the email address as desired, right under the delivery address - thanks for that; but, the problem is that after inserting that variable, the only order confirmation email being sent out is to the customer - the admin copies are not sent out. Tested it without the variable again just to be sure and that was indeed the case - any thoughts?

 

Thanks again

Ron

Posted

Ron,

please post your checkout_process.php file with the added change you made that was causing the store owner not to receive the email.

 

The added email address shouldn't effect the email being sent to the store owner.

  • 2 weeks later...
Posted
Similar question...

 

My client want the Admin order email to have the customers email address as the sender/from address.

 

Anyone know how to do that?

 

the change is to be made to catalog/checkout_process.php

 

the mail function in includes/function/general.php is:

 

function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {.....................

 

so to make the sender of the email be the customer, change the last 2 variables in

 

  if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

 

so it would be

  if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
 }

Posted

Hi Jeff - as fate would have it, the above was actually a better solution for me than the previous assistance I requested [and could not get going for some reason!] - - so once again thank you very much as this was a perfect solution for me.

 

It's so great being able to get solutions to so many problems and answers to almost any question here - - thanks again for donating your time and efforts!

 

Ron

Archived

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

×
×
  • Create New...