Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Auto sent e-mails


Guest

Recommended Posts

Hi!

 

I have a big problem trying to find one of the auto-sent emails, the mail that is beeing sent to the user when he/she have placed an order, I've checked the checkout_process.php but I can't seem to find it!

 

Can anyone please help me maybe?

 

Thanks in advance

 

//_booty

Link to comment
Share on other sites

Hi!

 

I have a big problem trying to find one of the auto-sent emails, the mail that is beeing sent to the user when he/she have placed an order, I've checked the checkout_process.php but I can't seem to find it!

 

Can anyone please help me maybe?

 

Thanks in advance

 

//_booty

 

It depends on what you are looking for

 

in the checkout_process.php

 

look for

 

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 $order = new order($insert_id);
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . tep_trans_id($order->info['date_purchased'],$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_S
UBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

 

If you are looking for the actual TEXT that goes into the email then you need to look in the in either the

 

catalog/includes/languages/english.php (or whatever your language of choice is)

 

or in

catalog/includes/languages/english/checkout_process.php

or

catalog/includes/languages/english/checkout_[filename].php <-- depending on what you are looking to do.

My Contributions

 

Henry Smith

Link to comment
Share on other sites

Hi custodian!

 

Thanks for your reply, but i still can't find it thoug, i wan't the acctual text that says "you have orderd this and this" the "order confirmation mail" i think you can call it :D Do you understand what I'm saying, cause my English is kinda bad, sry for that! :S

 

//_booty

Link to comment
Share on other sites

Hi custodian!

 

Thanks for your reply, but i still can't find it thoug, i wan't the acctual text that says "you have orderd this and this" the "order confirmation mail" i think you can call it :D Do you understand what I'm saying, cause my English is kinda bad, sry for that! :S

 

//_booty

 

 

booty.. that's what that does.

 

example

 

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

 

EMAIL_TEXT_PRODUCTS is read from catalog/includes/languages/english/checkout_process.php and expands to Products

 

Therefore that section becomes

 

Products

List of what you ordered

 

 

this send the mail off

 

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

 

EMAIL_TEXT_SUBJECT is pulled from catalog/includes/languages/english/checkout_process.php which is

define('EMAIL_TEXT_SUBJECT', 'Order Process');

 

So the email gets sent with

 

To: customer['email_address'],

Subject EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS

 

So the Subject may become

 

Subject: Order Process 233-403 Your Store, Your email

 

and so forth.. it's all there.. it's dynamic :)

 

Am I missing something or misunderstanding this ?

Edited by custodian

My Contributions

 

Henry Smith

Link to comment
Share on other sites

Hey again!

 

Oh, now I see, you are probably right, me who messed up :D I'm gonna check out a little closer, if I don't manage to fix it I'll post a new reply later :)

Link to comment
Share on other sites

i found this in checkout_process.php

 

since I'm from Sweden the code is in swedish, I hope you understand it anyway :D

 

<?php
/*
 $Id: checkout_process.php,v 1.25 2001/09/15 13:35:05 dwatkins Exp $

 The Exchange Project - Community Made Shopping!
 http://www.theexchangeproject.org

 Copyright (c) 2000,2001 The Exchange Project

 Released under the GNU General Public License
*/

define('EMAIL_TEXT_SUBJECT', 'Best?llning');
define('EMAIL_TEXT_ORDER_NUMBER', 'Ordernummer:');
define('EMAIL_TEXT_INVOICE_URL', 'Detaljerad faktura:');
define('EMAIL_TEXT_DATE_ORDERED', 'Best?llningsdatum:');
define('EMAIL_TEXT_PRODUCTS', 'Produkter');
define('EMAIL_TEXT_SUBTOTAL', 'Exkl moms & frakt:');
define('EMAIL_TEXT_TAX', 'Moms:	   ');
define('EMAIL_TEXT_SHIPPING', 'Frakt:	');
define('EMAIL_TEXT_TOTAL', 'Totalt:   ');
define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Leveransadress');
define('EMAIL_TEXT_BILLING_ADDRESS', 'Faktureringsadress');
define('EMAIL_TEXT_PAYMENT_METHOD', 'Betalningss?tt');

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

 

that is the code that sends the mail, am I right? if it is, then if i wanna ad somethin can i just put like at the end of the code then?

 

 

define('TEXT_EMAIL_VIA', 'via');

'Heeeeloooo!!!';

?>

Link to comment
Share on other sites

i found this in checkout_process.php

 

since I'm from Sweden the code is in swedish, I hope you understand it anyway :D

 

<?php
/*
 $Id: checkout_process.php,v 1.25 2001/09/15 13:35:05 dwatkins Exp $

 The Exchange Project - Community Made Shopping!
 http://www.theexchangeproject.org

 Copyright (c) 2000,2001 The Exchange Project

 Released under the GNU General Public License
*/

define('EMAIL_TEXT_SUBJECT', 'Best?llning');
define('EMAIL_TEXT_ORDER_NUMBER', 'Ordernummer:');
define('EMAIL_TEXT_INVOICE_URL', 'Detaljerad faktura:');
define('EMAIL_TEXT_DATE_ORDERED', 'Best?llningsdatum:');
define('EMAIL_TEXT_PRODUCTS', 'Produkter');
define('EMAIL_TEXT_SUBTOTAL', 'Exkl moms & frakt:');
define('EMAIL_TEXT_TAX', 'Moms:	   ');
define('EMAIL_TEXT_SHIPPING', 'Frakt:	');
define('EMAIL_TEXT_TOTAL', 'Totalt:   ');
define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Leveransadress');
define('EMAIL_TEXT_BILLING_ADDRESS', 'Faktureringsadress');
define('EMAIL_TEXT_PAYMENT_METHOD', 'Betalningss?tt');

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

 

that is the code that sends the mail, am I right? if it is, then if i wanna ad somethin can i just put like at the end of the code then?

define('TEXT_EMAIL_VIA', 'via');

'Heeeeloooo!!!';

?>

 

Almost.

 

It must be a define like

 

 

define('TEXT_EMAIL_HELLO', 'Heeeeloooo!!!');

 

That make TEXT_EMAIL_HELLO = Heeeeloooo!!!

 

Now in the catalog/checkout_process.php you;d have to do something like

 

 

 

// lets start with the email confirmation

$email_order = TEXT_EMAIL_HELLO . "\n" . STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

$order = new order($insert_id);

 

You can place the TEXT_EMAIL_HELLO anywhere as long as you keep the correct formatting. Though depending on where you place it will also change where it is located in the email itself - That's why I put it first.

Edited by custodian

My Contributions

 

Henry Smith

Link to comment
Share on other sites

Ok, so i just can't add plain text "hard coded" into the checkout_process.php file?

cause that would make this alout easier :D

 

It's usually better to do it the way I described, this way you go into the define file and change the text ot hello and every pace you have that text will automatically change too. Like when you set you store name... you didn't edit every file. You set it in one place and it auto fills

 

 

You can hardcode to a point though you'll still need to stick to the formatting

 

 

Example my way

 

// lets start with the email confirmation

$email_order = TEXT_EMAIL_HELLO . "\n" . STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

$order = new order($insert_id);

 

Hard coded

 

// lets start with the email confirmation

$email_order = "Heeeeloooo!!!\n" . STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

$order = new order($insert_id);

 

 

Another example

 

// lets start with the email confirmation

$email_order = "Heeeeloooo!!!\n" . STORE_NAME . "\n" . "Thank you for your order" .

EMAIL_SEPARATOR . "\n" .

$order = new order($insert_id);

 

 

the " " take things literally. the . connects the \ escapes

 

One more example using an \ (escape)

 

// lets start with the email confirmation

$email_order = "Heeeeloooo!!!\n" . STORE_NAME . "\n" . "Thank you! We\'ll be here from 9 to 5" .

EMAIL_SEPARATOR . "\n" .

$order = new order($insert_id);

My Contributions

 

Henry Smith

Link to comment
Share on other sites

So i can't just hard code it in the "little" checkout_process.php (the one that's place in ..../languages/) ?

 

Well, I'll try your way! :D

 

You been a great help custodian, thanks a bunch :)

 

//_booty

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...