oscommerce2006 Posted February 26, 2006 Posted February 26, 2006 Does anyone know how it is possible to change the content of the emails sent to the customer automatically when updating their order? Cheers,
Guest Posted February 26, 2006 Posted February 26, 2006 have a look in the catalog\admin\orders.php locate the tep_mail function and add to the $email variable extra text if you want to or change its parameters. For example: $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']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); $email .= "\n\n" . 'Add some extra text for the order update here' . "\n\n"; tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
petercascio Posted February 27, 2006 Posted February 27, 2006 Hi, thanks, this works well but the order header with order number, detailed invoice date etc is now repeated under the additional message. I tried putting the additional message both above and below the existing code (swapping the .= as appropriate) with the same result.
Guest Posted February 27, 2006 Posted February 27, 2006 post the code that you have now. The entire update_order case code
petercascio Posted February 27, 2006 Posted February 27, 2006 $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']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); // additional text message $email .= "\n\nThank you for your order! \r\n Enjoy! \n\n" . // end of additional text message tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')"); Is that enough?
Guest Posted February 27, 2006 Posted February 27, 2006 yea I think so. replace this code $email .= "\n\nThank you for your order! \r\n Enjoy! \n\n" . with this: $email .= "\n\nThank you for your order! \r\n Enjoy! \n\n"; and retry
Guest Posted February 27, 2006 Posted February 27, 2006 have a look in the catalog\admin\includes\languages\english\orders.php. You could append the string there too under the EMAIL_TEXT_STATUS_UPDATE and remove the additional string code you added.
petercascio Posted February 27, 2006 Posted February 27, 2006 have a look in the catalog\admin\includes\languages\english\orders.php. You could append the string there too under the EMAIL_TEXT_STATUS_UPDATE and remove the additional string code you added. I tried this without success. Problem is that this code seems to be for updates only, not for the inititial order.
Guest Posted February 28, 2006 Posted February 28, 2006 what initial order? The inital email order is generated from the checkout_process.php Why you mentioned an order update? Does anyone know how it is possible to change the content of the emails sent to the customer automatically when updating their order?
petercascio Posted February 28, 2006 Posted February 28, 2006 Big ooops.. we were talking cross-purpose here. The original question was by somebody else. I used the code you had above in orders.php but got the desired message with that duplicate order header. I now used it in checkout_process.php with $email_order and all is now well. I'm really sorry for the confusion -- and many thanks for your help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.