Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order process email


cox1e

Recommended Posts

Hi,

I am look to modify the email sent to a client when an order is first received.

I would like to take the link out if it and change some text.

Can anyone point me in the right direction

 

Thanks

Dave

Link to comment
Share on other sites

/catalog/checkout_process.php

 

Most of it is in this code:

 

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

Everything concatenated to the variable $email_order is what ends up in the order email.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Thanks for the speedy response.

I have found the right bit and managed to remove the URL ect but i would like to add to Standard text to this email

I have left a gap to where i would want it. How do i do this?

Thanks again

 

 

 

// 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";

Link to comment
Share on other sites

Just find the appropriate place of insertion and follow the examples supplied in the code:

 

  $email_order .= "\n" . 'This is the first line I added' . "\n" .
					 'This is the second line I added' . "\n" .
					 'This is the last line I added' . "\n\n";

Something like that.

 

Make a backup before you begin.

 

Any ' (single tick marks) in the text must have a \ before them .

Example:

 

'Orders won\'t be processed before payment is received.'

 

If your shop is multilingual you'd want to use defined constants in the language files instead of inserting hard coded text in this manner.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Just find the appropriate place of insertion and follow the examples supplied in the code:

 

  $email_order .= "\n" . 'This is the first line I added' . "\n" .
					 'This is the second line I added' . "\n" .
					 'This is the last line I added' . "\n\n";

Something like that.

 

Make a backup before you begin.

 

Any ' (single tick marks) in the text must have a \ before them .

Example:

 

'Orders won\'t be processed before payment is received.'

 

If your shop is multilingual you'd want to use defined constants in the language files instead of inserting hard coded text in this manner.

Thanks a heap thats great!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...