Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

order process e-mail


Guest

Recommended Posts

Hi Everybody..how do I add text to the order process e-mail that is sent after a customer has made a order.

I want to add some text and bank account number to it.

 

Any help would be wonderful.

 

Rich

Link to comment
Share on other sites

Hi Everybody..how do I add text to the order process e-mail that is sent after a customer has made a order.

I want to add some text and bank account number to it.

 

Any help would be wonderful.

 

Rich

 

Hi Rich,

 

In the file "catalog/checkout_process.php" you will find the following code, which produces the email content:

   // lets start with the email confirmation
 $email_order = STORE_NAME . "\n" . 
				EMAIL_SEPARATOR . "\n" . 
				EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

/*	Added for Paylink Module - Steve Renouf 
*  Add the Paylink Transaction Number and the shop's transaction Identifier code
*  to the confirmation emails sent to the customer and the shop owner
*/

This is where you could add your code:

EMAIL_TEXT_PAYLINK_TRANSACTION_NUMBER . ' ' . $variable_name . "\n" .
  					  EMAIL_TEXT_PAYLINK_TRANSACTION_UNIQUE_IDENTIFIER . ' ' . $variable_name . "\n" .
/*	eof--> Added for Paylink Module */	

				EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
				EMAIL_TEXT_DATE_ORDERED . ' ' . date('Y/m/d - H:i:s', (time() - 3600)) . "\n\n";
 if ($order->info['comments']) {
   $email_order .= "Customer Comments:\n" .
  	 					  EMAIL_SEPARATOR . "\n" .
  	 					  tep_db_output($order->info['comments']) . "\n\n" .
  	 					  EMAIL_SEPARATOR . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
				 EMAIL_SEPARATOR . "\n" . 
				 $products_ordered . 
				 EMAIL_SEPARATOR . "\n";
 $order_id = insert_id;

 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'], STORE_NAME . ' - ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

You need to add a line similar to one I've added in the above code:

EMAIL_TEXT_PAYLINK_TRANSACTION_NUMBER . ' ' . $variable_name . "\n" .

But change the text to whatever you want - i.e.

EMAIL_TEXT_BANK_ACCOUNT# . ' ' . $your_variable_name . "\n" .

Giving the Bank Account Number your own variable name.

 

 

Also, in the "catalog/includes/languages/english/checkout_process.php"

 

Add the following line where the other EMAIL_TEXT bits are:

define('EMAIL_TEXT_BANK_ACCOUNT#', '123456789');

 

replacing "123456789" with your account number.

 

You can use this same process for adding any other information you want to add to the email and you can position it anywhere within the email body - but you need to be careful where you insert the code so as not to mess up the text continuation " . " otherwise it won't work.

 

(There are basically two situations, the one I've outlined above, or the following:

$email_order .= EMAIL_TEXT_BANK_ACCOUNT#  . ' ' . $your_variable_name . "\n";

where you can put it on a line on it's own, before or after one of the other sections of text.

 

I hope you can follow that and I haven't confused you too much :)

 

Any probs, give me a shout.

 

Cheers,

Steve

* * * * * * * * * * * * * * * * * * * * *

Porpoises are most happy when wet!

\ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _

Link to comment
Share on other sites

Hi Rich,

 

Sorry, I'm having a "petit mal"

 

Add the following line where the other EMAIL_TEXT bits are:

define('EMAIL_TEXT_BANK_ACCOUNT#', '123456789');

 

 

That should, of course, read:

define('EMAIL_TEXT_BANK_ACCOUNT#', 'Bank Account #: ');

 

Or whatever working you want to use in place of "Bank Account #: " (remembering to leave a space after : so that the number doesn't butt up against it when rendered).

 

You could then define your variable for the actual account number seperately or include it in the above text thus:

 

"Bank Account #: 123456789" for example

 

Cheers,

Steve

* * * * * * * * * * * * * * * * * * * * *

Porpoises are most happy when wet!

\ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...