aj7778 Posted August 13, 2008 Posted August 13, 2008 Hi, I've searched everywhere on this forum and google but can't find where to edit the email that gets sent from oscommerce when I update the order status as shipped. Just to clarify, the "order process" email when status is changed to shipped. If someone could point me in the right direction that would be great. Thanks
Ronaldinho53 Posted August 13, 2008 Posted August 13, 2008 I believe that's in Admin/Configuration/My Store/Send extra order emails to "Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark to read." GROUCHO (1895-1977)
germ Posted August 13, 2008 Posted August 13, 2008 /admin/orders.php Specifically this code: if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $customer_notified = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $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]); 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) . "')"); $order_updated = true; } I think. 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 >
aj7778 Posted August 13, 2008 Author Posted August 13, 2008 I believe that's in Admin/Configuration/My Store/Send extra order emails to No that's not correct I don't think. That's to send a copy of the order to the store owner. I want to edit the email that gets sent to the customer when the store owner updates the order status to shipped.
aj7778 Posted August 13, 2008 Author Posted August 13, 2008 /admin/orders.php Specifically this code: I think. Thanks Germ, I'm sure this is correct. I'm have a little trouble getting the text I have inserted to display. I'm sure it's to do with syntax. Would you know where I'm going wrong? To test it, I've insert the text "test text update order", which I want to appear at the top of the email. Here's the code so far: if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $customer_notified = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $email = "test text update order" . "\n\n" . 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]); 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) . "')"); $order_updated = true; }
Ronaldinho53 Posted August 13, 2008 Posted August 13, 2008 Oops...my misunderstanding...sorry about that. In that case I'd follow Jim's advice. "Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark to read." GROUCHO (1895-1977)
germ Posted August 13, 2008 Posted August 13, 2008 I don't see anything wrong with the code you have. I'm assuming the text you added never shows up? :unsure: 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 >
aj7778 Posted August 13, 2008 Author Posted August 13, 2008 I don't see anything wrong with the code you have. I'm assuming the text you added never shows up? :unsure: I just resolved the problem. I did another test. I've actually got "quickship" installed. If I use this module to update the status, then it sends the email using quickship.php file. If I just update the status in the normal oscommerce way, then it uses /admin/orders.php Thanks for your help germ!! :D I hope it's not bad form to ask in this post(let me know if it is), but I'm trying to doing something else with the order email in this post http://www.oscommerce.com/forums/index.php?showtopic=311669 I would appreciate it if you could take a quick look germ. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.