osmium Posted July 20, 2005 Share Posted July 20, 2005 How do I add a customers email to the body of the confirmation email that is sent to them and myself once they place an order? thanks Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2005 Share Posted July 20, 2005 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 More sharing options...
osmium Posted July 27, 2005 Author Share Posted July 27, 2005 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 More sharing options...
imlifu Posted July 27, 2005 Share Posted July 27, 2005 In checkout_process.php add: $email_order .= "\n" . ?$order->customer['email_address'] . "\n"; I'd put it just above: ?if (is_object($$payment)) { Matti <{POST_SNAPBACK}> 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 More sharing options...
Guest Posted July 27, 2005 Share Posted July 27, 2005 But I can't find ?if (is_object($$payment)) { in the checkout_process.php, bear me for new to os, thanks <{POST_SNAPBACK}> 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 More sharing options...
Guest Posted July 27, 2005 Share Posted July 27, 2005 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 <{POST_SNAPBACK}> 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 More sharing options...
Somps Posted July 28, 2005 Share Posted July 28, 2005 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 <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Somps Posted July 28, 2005 Share Posted July 28, 2005 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 <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Somps Posted July 28, 2005 Share Posted July 28, 2005 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 <{POST_SNAPBACK}> How can I get to this page? Link to comment Share on other sites More sharing options...
Somps Posted July 28, 2005 Share Posted July 28, 2005 How can I get to this page? <{POST_SNAPBACK}> 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 <{POST_SNAPBACK}> 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 More sharing options...
Guest Posted July 28, 2005 Share Posted July 28, 2005 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 More sharing options...
asianais Posted July 28, 2005 Share Posted July 28, 2005 That is the language file for checkout_process.php .... look in the main directory for checkout_process.phpMatti <{POST_SNAPBACK}> 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 More sharing options...
Patrick146 Posted July 29, 2005 Share Posted July 29, 2005 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. <{POST_SNAPBACK}> 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 More sharing options...
asianais Posted August 4, 2005 Share Posted August 4, 2005 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 <{POST_SNAPBACK}> 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.