Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

order comfirmation email adjustment


propowders

Recommended Posts

The email is output and formatted in checkout_process.php and includes/languages/english/checkout_process.php

 

From the main file:

 

// lets start with the email confirmation
 $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";
   }
 }
 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

Matti

Link to comment
Share on other sites

The email is output and formatted in checkout_process.php and includes/languages/english/checkout_process.php

 

From the main file:

 

// lets start with the email confirmation
 $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";
   }
 }
 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

Matti

 

Hi Matti, :(

This is my script Please tell me where can I add "Thank you note" for customer?

Thanks.

<?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');

?>

OH Boy!!! Not again!!!!!!!!!!!!!!!!!!!!!!

Link to comment
Share on other sites

what would I need to do to include the

invoice number and the product model

in the confirmation email? and in the send extra email? can't quite get it right,

 

is it in checkout_confirmation.php, is this line correct?

 

define('EMAIL_TEXT_PRODUCTS_MODEL, 'Products Model');

 

what is the correct line to add for the invoice number

 

 

 

 

Thanks all for any help at all

Ian

Link to comment
Share on other sites

The model number is already included in the email - make sure that you have 'display product model' enabled in admin->configuration->product listing

 

 

The 'order number is synonymous with 'invoice number' - its there also:

 

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

 

Matti

Link to comment
Share on other sites

Hi Matti,  :(

This is my script Please tell me where can I add "Thank you note" for customer?

Thanks.

 

 

 

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

 osCommerce, Open Source E-Commerce Solutions
 [url=http://www.oscommerce.com]http://www.oscommerce.com[/url]

 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 TEXT_THANKYOU', ' Thankyou for shopping with' . STORE_NAME . '!');

define('EMAIL_SEPARATOR', '------------------------------------------------------');
define('TEXT_EMAIL_VIA', 'via');
?>

 

and in checkout_process.php after:

 

    if ($payment_class->email_footer) { 
     $email_order .= $payment_class->email_footer . "\n\n";
   }
 }

 

add:

 

    $email_order .=  EMAIL_TEXT_THANKYOU . "\n\n";

 

Matti

Link to comment
Share on other sites

Thanks Matti for the info, It was turned off :blush:

Do You Know how to display products_model together with order number in

TEXT_EMAIL_SUBJECT ?

I Have the order number ok but I am strugglin to get the model In as well, This is what I have now-

EMAIL_TEXT_SUBJECT . ' '.$insert_id,

 

The model number is already included in the email - make sure that you have 'display product model' enabled in admin->configuration->product listing

The 'order number is synonymous with 'invoice number' - its there also:

 

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

 

Matti

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...