Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Show Status of order in the NEW ORDERS table

    Hello Ajah, :-)


    Might there be a way to get the status to show in the NEW ORDERS table
    next to the order in the ADMIN HOME.

    This is how it looks now..

    New orders:
    Erick Martin $2,877.40
    03/07/2011


    CAN it look like this showing the current status..

    Erick Martin $2,877.40
    03/07/2011 Processing or whatever the current status is.


    maybe ??

    Thx
    Erick

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

    Default Re: Show Status of order in the NEW ORDERS table

    This is a crude hack of the the code that I grabbed from another piece of code and did not clean up extra data that might be selected but it works:
    /admin/index.php

    you can change the code around line 155 to:
    Code:
      <?php
    //   "select o.orders_id as orders_id, o.customers_name as customers_name, o.customers_id, o.date_purchased as date_purchased, o.currency, o.currency_value, ot.class, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and class = 'ot_total') order by orders_id DESC limit 5"
    
      $orders = $db->Execute("select o.orders_id as orders_id, o.customers_id, o.customers_name as customers_name, o.payment_method, o.shipping_method, o.date_purchased as date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS_STATUS . " s, " .
                              TABLE_ORDERS . " o " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . "  order by orders_id DESC limit 5" );
    
      while (!$orders->EOF) {
        echo '              <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'oID=' . $orders->fields['orders_id'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink"> ' . $orders->fields['customers_name'] . '</a></span><span class="center">' . $orders->fields['order_total'] . ' - ' . $orders->fields['orders_status_name'] . '</span><span class="rigth">' . "\n";
        echo zen_date_short($orders->fields['date_purchased']);
        echo '              </span></div>' . "\n";
        $orders->MoveNext();
      }
    ?>
    and that should make it show up for you ...

    Adjust as needed ...
    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!

  3. #3
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: Show Status of order in the NEW ORDERS table

    I lost every thing for that table,

    I replaced this code here with yours uptop and the whole table disappered.. :-(
    did I miss something ?

    <?php $orders = $db->Execute("select o.orders_id as orders_id, o.customers_name as customers_name, o.customers_id, o.date_purchased as date_purchased, o.currency, o.currency_value, ot.class, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and class = 'ot_total') WHERE o.orders_status < 4 order by orders_id DESC limit 5");

    while (!$orders->EOF) {
    echo ' <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'oID=' . $orders->fields['orders_id'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink"> ' . $orders->fields['customers_name'] . '</a></span><span class="center">' . $orders->fields['order_total'] . '</span><span class="rigth">' . "\n";
    echo zen_date_short($orders->fields['date_purchased']);
    echo ' </span></div>' . "\n";
    $orders->MoveNext();
    }
    ?>

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Status of order in the NEW ORDERS table

    Code:
      $orders = $db->Execute("select o.orders_id as orders_id, o.customers_id, o.customers_name as customers_name, o.payment_method, o.shipping_method, o.date_purchased as date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS_STATUS . " s, " .
                              TABLE_ORDERS . " o " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . "  order by orders_id DESC limit 5" );
    $new_fields . and $new_table . don't look like they belong here - they probably were part of the other code Ajeh took it from.

  5. #5
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: Show Status of order in the NEW ORDERS table

    That was IT !! removed those lines and it works..

    Thank you so MUCH AGAIN !!!

    for anyone who searches this here is the code as I have it
    to show the status of an order right in the ADMIN HOME

    <?php // "select o.orders_id as orders_id, o.customers_name as customers_name, o.customers_id, o.date_purchased as date_purchased, o.currency, o.currency_value, ot.class, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and class = 'ot_total') order by orders_id DESC limit 5"

    $orders = $db->Execute("select o.orders_id as orders_id, o.customers_id, o.customers_name as customers_name, o.payment_method, o.shipping_method, o.date_purchased as date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" . " from (" . TABLE_ORDERS_STATUS . " s, " . TABLE_ORDERS . " o " . ") left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . " order by orders_id DESC limit 5" );

    while (!$orders->EOF) { echo ' <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'oID=' . $orders->fields['orders_id'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink"> ' . $orders->fields['customers_name'] . '</a></span><span class="center">' . $orders->fields['order_total'] . ' - ' . $orders->fields['orders_status_name'] . '</span><span class="rigth">' . "\n"; echo zen_date_short($orders->fields['date_purchased']); echo ' </span></div>' . "\n"; $orders->MoveNext(); } ?>

  6. #6
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: Show Status of order in the NEW ORDERS table

    OOPs,

    but the ADMIN home is now showing orders that are in deliverd status and it was NOT
    before.

    any way to fish them out again, so DELIVERED orders do NOT show ??

    thx
    Erick

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

    Default Re: Show Status of order in the NEW ORDERS table

    Silly silly me ... I forgot about those ...

    Glad you go that working now ...
    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!

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Status of order in the NEW ORDERS table

    Your original code (in post 3) shows

    on (o.orders_id = ot.orders_id and class = 'ot_total') WHERE o.orders_status < 4

    and the status check is missing from the new code.

  9. #9
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: Show Status of order in the NEW ORDERS table

    added her, no luck did I do it right ?

    $orders = $db->Execute("select o.orders_id as orders_id, o.customers_id, o.customers_name as customers_name, o.payment_method, o.shipping_method, o.date_purchased as date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" . " from (" . TABLE_ORDERS_STATUS . " s, " . TABLE_ORDERS . " o " . ") left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') WHERE o.orders_status < 4 order by orders_id DESC limit 5");

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

    Default Re: Show Status of order in the NEW ORDERS table

    Let's step back and noticed I goobered up the SELECT ...

    Try this and see if now all the ducks are in a row ...
    Code:
      $orders = $db->Execute("select o.orders_id as orders_id, o.customers_id, o.customers_name as customers_name, o.payment_method, o.shipping_method, o.date_purchased as date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              $new_fields . "
                              from (" . TABLE_ORDERS_STATUS . " s, " .
                              TABLE_ORDERS . " o " .
                              $new_table . ")
                              left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " . "
                              where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "'
                              and o.orders_status < 5
                              order by orders_id DESC limit 5" );
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Order list doesn't show the correct payment status
    By kalastaja in forum Managing Customers and Orders
    Replies: 3
    Last Post: 29 Sep 2013, 04:03 AM
  2. v139d Order Status - Orders.php
    By Forum5 in forum General Questions
    Replies: 0
    Last Post: 24 Apr 2012, 04:03 AM
  3. Default order status not being used on new orders
    By Indiana in forum Managing Customers and Orders
    Replies: 1
    Last Post: 17 Oct 2010, 01:02 PM
  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