Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customize E-mail to Customers


Amadeuss

Recommended Posts

Posted

First of all... When I place an order, my customers receive something like this:

 

Company.de

------------------------------------------------------

Order Number: 18

Detailed Invoice: http://www.company.de/company.de/account_h...php?order_id=18

Date Ordered: Saturday 27 December, 2008

 

Products

------------------------------------------------------

1 x Acuvue 2 Colours Opaque () = 45.90 EUR

Durchmesser (DIA) 14.00

Farben Blue

Radius (BC) 8.30

Stärke (Sph/PWR) -2.00

------------------------------------------------------

Sub-Total: 45.90 EUR

Zone Based Shipping Rates (Deutsche Post *nur Paketstation* : 0.022 kg(s)): 2.50 EUR

MwSt. 19%: 7.33 EUR

Total: 48.40 EUR

 

Delivery Address

------------------------------------------------------

Client Name

Museumsstr. 1

Fake Address

Germany

 

Billing Address

------------------------------------------------------

Client Name

Museumsstr. 1

Fake Address

Germany

 

Payment Method

------------------------------------------------------

Cash on Delivery

 

 

 

I need this

 

 

Order Number: 18

 

 

to dissapear and also add a signature line with terms and conditions for receiving the email like : blah blah if you are not the intended recipient, please delete or something like this.

 

I know this can be done in admin/ orders.php... but where?

THank you!

Posted

Remove/comment out the code for the order no and depends where in the email you want the new lines to appear.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

Make an "email signature line" in each language you support:

 

/catalog/includes/languages/[iNSERT EACH LANGUAGE YOU SUPPORT HERE]/checkout_process.php

 

Just BEFORE the closing PHP tag line:

 

?>

Something like this:

 

define('EMAIL_TEXT_SIGNATURE', 'If you have received this mail in error please disregard and delete it');

Then in /catalog/checkout_process.php change 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";

to:

 

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

That eliminates the order number.

 

To add the signature find this code:

 

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

Change it to:

 

  $email_order .= EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_SIGNATURE . "\n";

 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

Always backup any file before making changes.

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 >

Posted
Any suggestions on adding the Product Desciption to the Customers Email?

Find someone that knows MYSQL better than I.

:blush:

 

The description isn't in any of the queries and I don't know how to add it.

 

I can't even spell MYSQL.

 

I'm just a PHP jockey...

:lol:

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 >

Posted
Find someone that knows MYSQL better than I.

:blush:

 

The description isn't in any of the queries and I don't know how to add it.

 

I can't even spell MYSQL.

 

I'm just a PHP jockey...

:lol:

 

 

Thanks for your response.

Posted

Hi, I followed this advice, and got the signature line in there. But I would like to have this test at the beginning of the email, between the date and the products heading. Can someone point me in the right direction as to what gets pasted where? Thanks, Bruce

Posted

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

Add this code:

 

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

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 >

Posted

Thanks so very much! I am very close to having this look the way I want. The last thing I am trying to do is add a separator line AFTER the signature text and before the comments. I've tried copying and pasting separator code in several different places, but I can not get it to work. I am no php expert, to be sure, so I am pretty sure this is some coding trick that I am not clever enough to decipher.

 

Thanks for all the help on this.

 

Bruce

Posted

Change the code I posted to:

 

 $email_order .= EMAIL_TEXT_SIGNATURE .  "\n" . EMAIL_SEPARATOR . "\n\n";

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 >

Posted

Hi,

 

My checkout_process.php file only has about 28 lines. Is something missing. I want to make more changes to the confirmation email, but can't find where to do it.

 

Thanks

Posted

You're looking at the one in the /includes/languages/english folder.

 

Look at the one in the root or /catalog folder.

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 >

Posted

You sure you are looking at catalog/checkout_process.php? Mine has over 300 lines. Looks like you are looking at catalog/includes/languages/english/checkout_process.php.

Posted
You sure you are looking at catalog/checkout_process.php? Mine has over 300 lines. Looks like you are looking at catalog/includes/languages/english/checkout_process.php.

 

Your right. I am looking where you suggested. I can't find catalog/checkout_process.php. Can you give me a more specific location to look?

 

Thanks. I feel like I am on the right track! :blush:

Posted

checkout.php should be in the main OSC directory, along with index.php and a bunch of others.

Posted

I am trying to edit my checkout_process.php. I've followed the steps above, but none of my 'custom' text is showing up in the emails. I've tried a bunch of versions, but nothing I'm doing seems to work. The only time I can get anything 'custom' to show up is if I edit a field that is already there in my includes/languages/english/checkout_process.php ...like define('EMAIL_TEXT_PRODUCTS', 'Products HERE IS SOME TEST TEXT');

 

I'm guessing it's because of how my checkout_process.php is set up. Can someone show me how to add the EMAIL_TEXT_SIGNATURE to 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";
}
 }
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

I'd like to add the 'EMAIL_TEXT_SIGNATURE'

right after: $email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

 

*I tried: $email_order .= EMAIL_TEXT_SIGNATURE . "\n\n"; in various spots to test, but none showed up.

 

thanks for any help

Posted

Hi there Zonk,

 

Change this code:

 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

 

to this code:

 

 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 EMAIL_TEXT_SIGNATURE . "\n\n" .
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

 

At the end of EMAIL_TEXT_SIGNATURE . "\n\n" you had an ; but you needed a . (dot)

 

Hope it helps

Posted

I don't know why but this still won't work. I have it set up in includes/language/english/checkout_process.php

define('EMAIL_TEXT_SIGNATURE', 'If you have received this mail in error please disregard and delete it');

 

And I've got my checkout_process.php set up like above.

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" . 
			 EMAIL_SEPARATOR . "\n" . 
	 EMAIL_TEXT_SIGNATURE . "\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);

 

Does this section have to do with if it is a 'download' instead of shipped product? Does it send a different email for each?

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

 

Thanks for the help so far everyone :)

Posted

I still can't any 'custom' fields to show up in my checkout completed emails.

 

Are there any other sections that might have to be edited? I've got all the above stuff done and triple checked them....plus tried various other 'test' configurations, but i can only get the same basic layout and info in the "order process" completed email.

 

Thanks for any suggestions :)

Posted

*I'm still baffled by this. I don't want to believe that the lack of suggestions from the community means I'm all alone on this one.

 

..but it's really lookin that way. ANY suggestions would be GREAT. I need to try whatever to get this 'simple' task to work.

 

Thanks for reading.

 

peace,

zOnk

Archived

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

×
×
  • Create New...