everything is work except text format in email needs change to html format and comments problem.
Because comments from admin is in order_status_history in mysql, not in order table, so I need get comments in order_status_history table, not get it from order table. How can you solve that problem?
$customer_notified = '0';
if ($HTTP_POST_VARS['notify'] == 'on' & $ups_track_num == '' ) {
$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]. "n" . EMAIL_TEXT_COMMENTS_UPDATE . $comments);
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';
}elseif ($HTTP_POST_VARS['notify'] == 'on' & tep_not_null($ups_track_num) ) {
$email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_UPS_TRACK_NUM . $ups_track_num . "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_TRACKING_NUMBER . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "nn" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status] . "n" . EMAIL_TEXT_COMMENTS_UPDATE . $comments);
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 received email and comments look like:
Your order has been updated to the following status.
New status: Processing
The comments for your order are
%s
Your order has been processed and will ship in 24 hrs. Please allow 4-8 days to delivery. Thank you For your order.
Please reply to this email if you have any questions.
How do I to delete %s?