shahed Posted November 11, 2002 Posted November 11, 2002 Hello I like to email my user the text which I write on Comments Field when I update an order. Sometime user are too lazy to go to site and look what I put an comment. I think there are 2 solutions for that. 1. Create another comment field and send that field on email. 2. Update current script so it will include Comments field on email. Can anyone help me out????? Shahed
bdownes Posted November 19, 2002 Posted November 19, 2002 Having the comments show up in notification emails was working until I upgraded to the new Checkout Version of 2.2. I am sure someone has a fix out there. I am stumped. Jared Geesey
zzfritz Posted November 19, 2002 Posted November 19, 2002 I agree sending the comments is a good idea, but don't see that it was ever done. The CVS shows the email notification first introduced in admin/orders v.1.71 and that part of the code is unchanged as of v.1.103. Anyway, the email message is constructed at line 41. Insertion of the comment is a simple hack: change admin/orders line 41 from this $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]); to this $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], $comments); and in admin/includes/languages/english/orders.php edit the define of EMAIL_TEXT_STATUS_UPDATE from this define('EMAIL_TEXT_STATUS_UPDATE', 'Your order has been updated to the following status.' . "nn" . 'New status: %s' . "nn" . 'Please reply to this email if you have any questions.' . "n"); to this define('EMAIL_TEXT_STATUS_UPDATE', 'Your order has been updated to the following status: %s' . "nn" . 'Comments:' . "n" . '%s' . "nn" . 'Please reply to this email if you have any questions.' . "n"); I have tested this, and my only misgiving is inclusion of the announcement "Comments:" when the comment is blank. An alternative hack will be in a following post.
zzfritz Posted November 19, 2002 Posted November 19, 2002 If you want to quote the comment only if there is one, do this instead. Replace lines 41-42 of admin/orders.php from $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); with this $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]); if (tep_not_null($comments)) $email .= TABLE_HEADING_COMMENTS . ":n" . $comments; tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); and in admin/includes/languages/english/orders.php replace this define('EMAIL_TEXT_STATUS_UPDATE', 'Your order has been updated to the following status.' . "nn" . 'New status: %s' . "nn" . 'Please reply to this email if you have any questions.' . "n"); with this define('EMAIL_TEXT_STATUS_UPDATE', 'Your order has been updated to the following status: %s' . "nn");
bdownes Posted November 20, 2002 Posted November 20, 2002 Very nice. Works very well. Thanks! Jared Geesey
zzfritz Posted November 23, 2002 Posted November 23, 2002 This feature has now been implemented in the CVS, as admin/orders.php v.1.106. Be sure to add the new defines from admin/includes/languages/english/orders.php v.1.22 (or your language).
Mr. Ree Posted November 23, 2002 Posted November 23, 2002 Thanks Fritz, A very worthy addition to this great program! Mr. Ree How to find answers to OSC Common Questions 1. Look at http://wiki.oscommerce.com 2. Search http://www.oscommerce.com/forums/ 3. Post a request in http://www.oscommerce.com/forums/
sunstilch Posted January 8, 2003 Posted January 8, 2003 Thanks So Much! I looked all over the forums for this..... My email comment updates werent working correctly, but now they are. Thank you very much, :D
kikko Posted February 4, 2003 Posted February 4, 2003 This feature has now been implemented in the CVS, as admin/orders.php v.1.106. Be sure to add the new defines from admin/includes/languages/english/orders.php v.1.22 (or your language). This is great! I'd neet this to be 1 page earlyer in order-proces... so that the client also get the Comment he add while ordering, with the Order-confirmation-email (extra info like what text to print to this product or something...)! I try to see this, but if someone have it fixed out, please tell me too. Maybe customes shoud have way to modify this Comment, before the Shop-owner have taken the Order (while the order is still "waiting"). Next maybe way to add some image to Order... for printing to product or something?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.