redguy Posted February 4, 2003 Share Posted February 4, 2003 I am currious if there is a way to add a trackin number to the email that gets sent out when I notify customers via status update, that there order has shipped. I tried adding it to the comments field but that doesn't show up on the email that is sent. Thanks Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2003 Share Posted February 5, 2003 Sure, it is pretty easy actually. I became tired of customers e-mailing me asking for the tracking number although it could be found by logging into their account so I added it to my e-mails. First do you have the UPS,FedEx,USPS tracking (HTML) installed if not I would suggest you do so as it is a very nice addition? Here is all you have to do to add the tracking number to the e-mail (This is for UPS and you need to do similar for the other shipping options): $customer_notified = '1'; }elseif ($HTTP_POST_VARS['notify'] == 'on' & tep_not_null($ups_track_num) & $fedex_track_num == '' & $usps_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']) . "n" . EMAIL_TEXT_TRACKING_NUMBER . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status], $comments); You will need to define the EMAIL_TEXT_UPS_TRACK_NUM in the language file admin/includes/languages/english/orders.php by adding this to it: define('EMAIL_TEXT_UPS_TRACK_NUM', 'UPS Tracking Number:'); Also notice the "$comments" at the very end...that will place the comments in the e-mail as well. The e-mail that is sent to your customer will now look like this: Order Number: 1176 UPS Tracking Number:1Z5Y36490392887864 Detailed Invoice: https://www.yoursite.com/catalog/account_hi...p?order_id=1176 Date Ordered: Friday 31 January, 2003 You can track your packages by clicking the link below. Login and go to account history and select view order for the order you would like to track. The link to track your package will be near the bottom of the page. https://www.yoursite.com/catalog/account_hi...p?order_id=1176 Your order has been updated to the following status. New status: Shipped Comments: Your order has now shipped. Thank you for your order...blah, blah,blah. Please reply to this email if you have any questions. HTH Link to comment Share on other sites More sharing options...
dreamscape Posted February 5, 2003 Share Posted February 5, 2003 JB, I too installed the 3 carrier HTML tracking... what I am thinking of doing in the email is this though: Order Number: 1176 Detailed Invoice: https://www.yoursite.com/catalog/account_hi...p?order_id=1176 Date Ordered: Friday 31 January, 2003 Your order has been updated to the following status. New status: Shipped Here is the tracking information for your order: UPS Tracking Number: 1Z5Y36490392887864 You may track your package by loggin in and viewing your order history: https://www.yoursite.com/catalog/account_hi...p?order_id=1176 Alternatively, you may put the tracking number in the tracking form on our site at http://www.yoursite.com/tracking.php or by tracking straight from UPS at http://wwwapps.ups.com/etracking/tracking....+Package%28s%29 Comments: Your order has now shipped. Thank you for your order...blah, blah,blah. Please reply to this email if you have any questions. The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
redguy Posted February 5, 2003 Author Share Posted February 5, 2003 SWEET!!! Thanks guys! One quick question since I am using two different shipping carriers (UPS for normal packages and USF Bestways for freight) is it difficult to leave out the link on the email to the tracking page? Or if you have an alternative suggestion I would open to that as well. JB - I just checked out your site...looks like I have a new source for my reef supplies. I have a 180 gal tank. I might have to turn to you for advise my tank and not just OSC. Thanks again and best of luck with your site. (Watch out for Marine Depot) Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2003 Share Posted February 5, 2003 I too would ultimately prefer the tracking number to be in the form of a link in the e-mail that goes directly to the tracking page at UPS. I just haven't had time to play around with it to make it work...maybe this weekend. I did the previous edit to my files a few weeks ago and have not had a chance to return to it yet. I figure any tracking number is better than no tracking number and it has stopped the "what is my tracking number?" e-mails. :twisted: Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2003 Share Posted February 5, 2003 LOL, Josh! I have a 60 gallon softie tank and a 200 gallon SPS tank so I started that site to help offset the mounting costs of my hobby/addiction. Heck, I order from Marine Depot all the time and actually need to place an order later today for a replacement part for my Ca-Reactor. For reef advice, I visit www.reefcentral.com daily and have the user name "saltshop". Link to comment Share on other sites More sharing options...
redguy Posted February 5, 2003 Author Share Posted February 5, 2003 I just got my user name "Josh Baker" and posted my first reply http://reefcentral.com/forums/showthread.p...841#post1007841 Link to comment Share on other sites More sharing options...
bdownes Posted March 4, 2003 Share Posted March 4, 2003 How would you have the admin copied (CCed) on every order confirmation. Just in case the database breaks, I would at least have a copy to contact the customer. Anyone know the code to add? Thanks! Bobby Jared Geesey Link to comment Share on other sites More sharing options...
networkdad Posted May 14, 2003 Share Posted May 14, 2003 Does anyone have this code or the module working on MS1 ?? Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2003 Share Posted May 14, 2003 Sure, it is pretty easy actually. I became tired of customers e-mailing me asking for the tracking number although it could be found by logging into their account so I added it to my e-mails. First do you have the UPS,FedEx,USPS tracking (HTML) installed if not I would suggest you do so as it is a very nice addition? Here is all you have to do to add the tracking number to the e-mail (This is for UPS and you need to do similar for the other shipping options): $customer_notified = '1'; }elseif ($HTTP_POST_VARS['notify'] == 'on' & tep_not_null($ups_track_num) & $fedex_track_num == '' & $usps_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']) . "n" . EMAIL_TEXT_TRACKING_NUMBER . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status], $comments); You will need to define the EMAIL_TEXT_UPS_TRACK_NUM in the language file admin/includes/languages/english/orders.php by adding this to it: define('EMAIL_TEXT_UPS_TRACK_NUM', 'UPS Tracking Number:'); Also notice the "$comments" at the very end...that will place the comments in the e-mail as well. The e-mail that is sent to your customer will now look like this: Order Number: 1176 UPS Tracking Number:1Z5Y36490392887864 Detailed Invoice: https://www.yoursite.com/catalog/account_hi...p?order_id=1176 Date Ordered: Friday 31 January, 2003 You can track your packages by clicking the link below. Login and go to account history and select view order for the order you would like to track. The link to track your package will be near the bottom of the page. https://www.yoursite.com/catalog/account_hi...p?order_id=1176 Your order has been updated to the following status. New status: Shipped Comments: Your order has now shipped. Thank you for your order...blah, blah,blah. Please reply to this email if you have any questions. HTH Hi! I was wondering where we are supposed to add this piece of code....thank yoU! Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2003 Share Posted May 14, 2003 The status update e-mails are sent from admin/orders.php Most of the code is already there the only part you really need to add is the EMAIL_TEXT_UPS_TRACK_NUM . $ups_track_num . "n" If you use FedEx and USPS as well you will need to do similar for each one of them. Add a define in the language file and add something like: EMAIL_TEXT_FEDEX_TRACK_NUM . $fedex_track_num . "n" In the section of the file that is sending out the e-mail you will see the code repeat itself for each shipping method. For UPS it will have tep_not_null($ups_track_num) For FedEx it will have tep_not_null($fedex_track_num) And so on. Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2003 Share Posted May 14, 2003 just one question, naybe you can help me...for some reason, the customer doesnt get teh comments that I enter..... here's my admin/orders.php -well, that section... /*Tracking contribution begin*/ $customer_notified = '0'; if ($HTTP_POST_VARS['notify'] == 'on' & $ups_track_num == '' & $fedex_track_num == '' & $usps_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], $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) & $fedex_track_num == '' & $usps_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], $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' & $ups_track_num == '' & tep_not_null($fedex_track_num) & $usps_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" . 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], $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' & $ups_track_num == '' & $fedex_track_num == '' & tep_not_null($usps_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" . 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], $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'; } /*Tracking contribution end*/ Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2003 Share Posted May 14, 2003 What snapshot are you using? Somewhere around Jan/Feb. the way comments are handled was changed so simply adding the $comments will not work on newer snapshots and MS1+ . Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2003 Share Posted May 14, 2003 2.2 MS1 2/27/03 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.