Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer email and phone number in the email confirmation


Tato

Recommended Posts

I use something like this in checkout_process.php for the additional mail so that it is convenient to email/call the customer:

 

// send emails to other people

 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

// WebMakers.com Added: Include Order # in Subject and customer's email address and phone in body

   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 

   EMAIL_TEXT_SUBJECT . ' #' . $insert_id, 

   $order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' ' . $order->customer['email_address'] . "nn" . 

   'Telephone ' . $order->customer['telephone'] . "nn" .

   nl2br($email_order), 

   STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

 }

Link to comment
Share on other sites

great Linda !!!!

 

it work's very well !!!

 

one more things, I'd like to put email and phone number to the bottom of the email, after the type of payment, can you help me ?

 

thank you

 

Tato

Link to comment
Share on other sites

I wrote that modification so that you could more easily change the order in which things appear.

 

The portion that contains the body of the email is:

 

 

$order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' ' . $order->customer['email_address'] . "nn" . 

   'Telephone ' . $order->customer['telephone'] . "nn" . 

   nl2br($email_order),

 

So arrange that as you want it to appear in the email.

Link to comment
Share on other sites

  • 2 months later...

Hi Linda,

 

I have used your download controller. It helped me lot.Please provide me the solution for this problem too.

 

I want to customize the OScommerce to fullfil my downloadable store needs.I want to configure the following things.

On checkout_payment.php, delivery address should be only email address.

Check_out_address.php should only contain the email address of the Customer.

 

In short, I want to use only the email address of my customers to deliver the shipment, to deliver the billing information etc.Because there is no need of postal or residential address to deliver my online downloadable products. PLease help me to customize my store.

Thanks

Link to comment
Share on other sites

Hi Linda,

 

I have figured out how to make the phone number show up in the order process / confirmation email. I get some mime headers and stuff at the top of the email, but I can live with that unless you know of an easy way to get rid of it.

 

The email now has the customers email address as the sent from address, which I actually like ... not sure how I made that happen!

 

Anyway, I would like to do that for the non-paypal IPN emails also. How can I make the customers email address appear as the sent from (received by) email address.

 

Here's what I have for the paypal IPN where it's working that way

        if (SEND_EXTRA_ORDER_EMAILS_TO != '') { // send emails to other people

         tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, $email_data_values['email_subject'], $email_data_values['email_text'], $order->customer['email_address'] . "nn" . 'Telephone ' . $order->customer['telephone']);

       };

Link to comment
Share on other sites

okay, I figured it out.... I took out the code; STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS and that made it work.

 

I would still like to be able make the email not have the mime info at the top of the email, if possible AND to put the customers name and email address in the text of the message.

 

Here's what the email looks like now.... (sent from is the customers email address ...)

Telephone 423-442-3190" <>

MIME-Version: 1.0

X-Mailer: osC mailer

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit

 

any help is greatly appreciated.

Link to comment
Share on other sites

  • 5 months later...
I use something like this in checkout_process.php for the additional mail so that it is convenient to email/call the customer:

 

// send emails to other people

 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

// WebMakers.com Added: Include Order # in Subject and customer's email address and phone in body

   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 

   EMAIL_TEXT_SUBJECT . ' #' . $insert_id, 

   $order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' ' . $order->customer['email_address'] . "nn" . 

   'Telephone ' . $order->customer['telephone'] . "nn" .

   nl2br($email_order), 

   STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

 }

 

I get:

Parse error: parse error, unexpected T_IF in "file path to my website"catalogcheckout_process.php on line 282

 

That line is:

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

 

I run "2003/03/22" on IIS.

 

Any help?

Link to comment
Share on other sites

That error would appear when there is a problem higher in the file, i.e. the actual problem (perhaps a missing ')') occurs higher and it just realizes that something is wrong on line 282. I would start by checking line 280 and work my way up.

 

Good luck,

Matt

Link to comment
Share on other sites

Line 280 is where this changed code starts. I cannot figure out where the error is (I don't really know PHP so it's hard to check for errors).

 

Since nobody else seems to have problems with it (?), one would think that it has something to do with my setup?

 

No html e-mail, LF linefeeds.

 

?

Link to comment
Share on other sites

  • 3 months later...
// send emails to other people

?if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

// WebMakers.com Added: Include Order # in Subject and customer's email address and phone in body

? ?tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 

? ?EMAIL_TEXT_SUBJECT . ' #' . $insert_id, 

? ?$order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' ' . $order->customer['email_address'] . "nn" . 

? ?'Telephone ' . $order->customer['telephone'] . "nn" .

? ?nl2br($email_order), 

? ?STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

?}

Does anybody have an update of this?

 

As I wrote earlier this does not work on my CVS version (28/3/2003) and I would _really_ like to add the e-mail address and the phone number to the e-mail I get.

 

This is in my checkout_process.php

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

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

 

Where do I insert the code for Phone and E-mail?

 

I'd prefer to have it after the Billing address, first the e-mail, then the phone.

 

This is $email_order

$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_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments']) {
   $email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 $products_ordered .
                 EMAIL_SEPARATOR . "\n";

 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
   $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
 }

 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_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
                   EMAIL_SEPARATOR . "\n";
   $payment_class = $$payment;
   $email_order .= $payment_class->title . "\n\n";
   if ($payment_class->email_footer) {
     $email_order .= $payment_class->email_footer . "\n\n";
   }
 }

I fail to see where the phone and e-mail is.

 

BTW it's OK if the phone and e-mail is also sent to the customer.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...