Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add text to status email


Giorgiogg

Recommended Posts

Hi,

i would like add different (long) text to evry order status notification

 

order

..

..

..

..

..

xxxxxxxxxxxx

 

processing

..

..

..

..

yyyyyyyyyyyy

 

sended

..

..

..

..

zzzzzzzzzzzzzz

 

 

Is possible?

 

I know that i can modify the first text in my payment module ex MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER...but if i add text it always seems ..to long and the system gives an error.

 

And the other mail...how to change?

Link to comment
Share on other sites

If the status-change text is always the same you could do it with a check in the admin page that sends the e-mail.

something like

// this is theoretical and will not actually work

if ($status_id == 1) {

                             $email = $email . MY_EXTRA_FOR_1;

}

 

Downside is you'll have to add a statement / define for each status you have.

 

You could also add a text field in the admin that gets added to the mail but that is more difficult.

 

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

i think that i had to work in /admin/order.php

 

around line 37 u can find this:

$customer_notified = '0';

if ($HTTP_POST_VARS['notify'] == 'on') {

$email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

$customer_notified = '1';

}

 

I could replace with a code similar to:

$customer_notified = '0';

if ( ($HTTP_POST_VARS['notify'] == 'on') && ($HTTP_POST_VARS['order_status_id'] == '2') ) {

$email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn" . EMAIL_TEXT_STATUS_UPDATE_MINE2;

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

elseif == '3') ) {

$email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn" . EMAIL_TEXT_STATUS_UPDATE_MINE3;

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

$customer_notified = '1';

}

 

What do u think about? and the code could be correct?

tnx

Link to comment
Share on other sites

I would also like to add custom text to the email that is sent to confirm the order.

 

In addition to the change in admin/orders.php that you posted, can you please post the other changes you made to make this work.

 

Thanks for your help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...