Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2005
    Posts
    16
    Plugin Contributions
    0

    Default Order status update - Include order total

    Hello,

    I need the order total to be automatically included in order status update email that customer receives. I have searched the solution in this forum and I know that I should modify the admin/orders.php file, but my only problem is that I don't know how to get the total to be printed in the email.

    Any help would be much appreciated.

  2. #2
    Join Date
    Nov 2005
    Posts
    16
    Plugin Contributions
    0

    Default Re: Order status update - Include order total

    EDIT: There are following lines in the orders.php:

    //send emails
    $message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" .
    EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
    EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" .
    EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
    strip_tags($notify_comments) .
    EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
    EMAIL_TEXT_STATUS_PLEASE_REPLY;

    I believe this block needs to be edited, I just don't know how to add the order total in here.
    Last edited by loostaq; 7 Dec 2007 at 07:34 AM. Reason: typo

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Order status update - Include order total

    You could add the field from the orders table to the select statement around line 90:
    PHP Code:
            $check_status $db->Execute("select customers_name, customers_email_address, orders_status,
                                          date_purchased, order_total from " 
    TABLE_ORDERS "
                                          where orders_id = '" 
    . (int)$oID "'"); 
    Then you can use it with:
    $check_status->fields['order_total']

    And add the currency conversion for that and add it to the TEXT and HTML email below that ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Nov 2005
    Posts
    16
    Plugin Contributions
    0

    Default Re: Order status update - Include order total

    THANK YOU!! That worked perfectly.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Order status update - Include order total

    You are most welcome ... glad that this worked for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jul 2004
    Location
    The Netherlands, Wierden
    Posts
    430
    Plugin Contributions
    0

    Default Re: Order status update - Include order total

    Quote Originally Posted by Ajeh View Post
    You could add the field from the orders table to the select statement around line 90:
    PHP Code:
            $check_status $db->Execute("select customers_name, customers_email_address, orders_status,
                                          date_purchased, order_total from " 
    TABLE_ORDERS "
                                          where orders_id = '" 
    . (int)$oID "'"); 
    Then you can use it with:
    $check_status->fields['order_total']

    And add the currency conversion for that and add it to the TEXT and HTML email below that ...
    I can't get it work, what am I missing?
    Code:
            $check_status = $db->Execute("select customers_name, customers_email_address, orders_status,
                                          date_purchased from " . TABLE_ORDERS . "
                                          where orders_id = '" . (int)$oID . "'");
    
            if ( ($check_status->fields['orders_status'] != $status) || zen_not_null($comments)) {
              $db->Execute("update " . TABLE_ORDERS . "
                            set orders_status = '" . zen_db_input($status) . "', last_modified = now()
                            where orders_id = '" . (int)$oID . "'");
    
              $notify_comments = '';
              if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on') && zen_not_null($comments)) {
                $notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $comments . "\n\n";
              }
              //send emails
              $message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" .
              EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
              EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" .
              EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
              strip_tags($notify_comments) .
              EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) . "\n\n" . $check_status->fields['order_total'] . "\n\n" . 
              EMAIL_TEXT_STATUS_PLEASE_REPLY;
    Is that also possible for just one particular order status update?

  7. #7
    Join Date
    Jul 2004
    Location
    The Netherlands, Wierden
    Posts
    430
    Plugin Contributions
    0

    Default Re: Order status update - Include order total

    The best should be for me that the first email (order notification) is without all payment instruction and the second one (first order update) will be like the normal order notification. So order status mail with order total.

    And the rest of the order status just the way it is.

    I need that this way, because I must change the deliverycost later. I use the edit order module for it.

    To much different products, weight, size to automize this with shipping costs.

 

 

Similar Threads

  1. v150 Customize order status email subject line to include status name
    By ShopVille in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Oct 2015, 09:24 PM
  2. v151 New Order Email Admin Update order status missing?
    By wrickspam in forum Managing Customers and Orders
    Replies: 1
    Last Post: 7 May 2014, 09:46 PM
  3. Change Email Subject of Status Update Messages e.g. Order Update XXXX
    By apemusic in forum Managing Customers and Orders
    Replies: 4
    Last Post: 13 Oct 2010, 08:42 AM
  4. Orders- Update status of order, delete order or print order paperwork.
    By dandownunder in forum Managing Customers and Orders
    Replies: 6
    Last Post: 8 Aug 2006, 09:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR