Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add email to body of confirmation email?


osmium

Recommended Posts

In checkout_process.php add:

 

 

$email_order .= "\n" .  $order->customer['email_address'] . "\n";

 

I'd put it just above:

 

  if (is_object($$payment)) {

 

Matti

Link to comment
Share on other sites

Thanks for that, works a treat :)

 

I was hoping I could work out my next Q from your reply but my knowledge of code is a little too limited.

 

How do I add an order number to the email subject? or anything that will help differentiate the various orders customers place

Link to comment
Share on other sites

In checkout_process.php add:

$email_order .= "\n" . ?$order->customer['email_address'] . "\n";

 

I'd put it just above:

 

 ?if (is_object($$payment)) {

 

Matti

 

But I can't find

  if (is_object($$payment)) {

in the checkout_process.php, bear me for new to os, thanks

Link to comment
Share on other sites

But I can't find
 ?if (is_object($$payment)) {

in the checkout_process.php, bear me for new to os, thanks

 

On a standard osCommerce file its line 249 :D

 

This as a section of the code from lines 246 - 257:

 

  $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";
   }
 }

 

Matti

Link to comment
Share on other sites

Thanks for that, works a treat :)

 

I was hoping I could work out my next Q from your reply but my knowledge of code is a little too limited.

 

How do I add an order number to the email subject? or anything that will help differentiate the various orders customers place

 

Change:

 

    tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

to:

 

    tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT . ' - '  . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id , $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

Matti

Link to comment
Share on other sites

On a standard osCommerce file its line 249  :D

 

This as a section of the code from lines 246 - 257:

 

 ?$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";
? ?}
?}

 

Matti

Link to comment
Share on other sites

On a standard osCommerce file its line 249  :D

 

This as a section of the code from lines 246 - 257:

 

 ?$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";
? ?}
?}

 

Matti

Link to comment
Share on other sites

On a standard osCommerce file its line 249  :D

 

This as a section of the code from lines 246 - 257:

 

 ?$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";
? ?}
?}

 

Matti

 

How can I get to this page?

Link to comment
Share on other sites

How can I get to this page?

 

On a standard osCommerce file its line 249  :D

 

This as a section of the code from lines 246 - 257:

 

  $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";
   }
 }

 

Matti

 

How can I get to this page?Thanks! The one I found in "file manage"

Filename: checkout_process.php

 

<?php

/*

$Id: checkout_process.php,v 1.26 2002/11/01 04:22:05 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('EMAIL_TEXT_SUBJECT', 'Order Process');

define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');

define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:');

define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:');

define('EMAIL_TEXT_PRODUCTS', 'Products');

define('EMAIL_TEXT_SUBTOTAL', 'Sub-Total:');

define('EMAIL_TEXT_TAX', 'Tax: ');

define('EMAIL_TEXT_SHIPPING', 'Shipping: ');

define('EMAIL_TEXT_TOTAL', 'Total: ');

define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Delivery Address');

define('EMAIL_TEXT_BILLING_ADDRESS', 'Billing Address');

define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method');

 

define('EMAIL_SEPARATOR', '------------------------------------------------------');

define('TEXT_EMAIL_VIA', 'via');

?>

 

I can't found anything that looks like yours????

Link to comment
Share on other sites

That is the language file for checkout_process.php .... look in the main directory for checkout_process.php

 

 

 

Matti

Link to comment
Share on other sites

That is the language file for checkout_process.php .... look in the main directory for checkout_process.php

Matti

 

Thanks.

When order has been ordered, it only send a copy of an email to customer not myself. Do you know why?How can I set it to the way that will send an email to both customer and myself? Thanks.

Link to comment
Share on other sites

Thanks.

When order has been ordered, it only send a copy of an email to customer not myself. Do you know why?How can I set it to the way that will send an email to both customer and myself? Thanks.

 

Go into your admin then My store tab and about half way down says 'send extra order email to' simply put the required email address in.

Link to comment
Share on other sites

On a standard osCommerce file its line 249  :D

 

This as a section of the code from lines 246 - 257:

 

 ?$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";
? ?}
?}

 

Matti

 

It doesn't work. Can any one tell me what I did wrong?Thanks.

 

$email_order .= "n" . EMAIL_TEXT_BILLING_ADDRESS . "n" .

EMAIL_SEPARATOR . "n" .

tep_address_label($customer_id, $billto, 0, '', "n") . "nn";

$email_order .= "n" . $order->customer['email_address'] . "n";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "n" .

EMAIL_SEPARATOR . "n";

$payment_class = $$payment;

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...