Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default new order list on admin home

    hi, my client only wants to see NEW orders on the admin home. right now it lists orders that have already been processed... i cant figure out what the "new" criteria is and i could not find anywhere in the admin to change it. so i want to hack the admin>index.php page to make it only show orders with an orders_status_id of 1 (pending). I am just learning php and mysql so i think i may have gotten the syntax wrong.

    here is what the code is and i marked which are my new/changed lines by [] bracketing them. this is not actually in the code. the changes are in lines 166-168 of the original code or here look for the variable $orders_status:

    <div class="header"><?php echo BOX_ENTRY_NEW_ORDERS; ?> </div>
    <?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) where class = 'ot_total' order by orders_id DESC limit 7");
    [ $orders_status = $db->Execute("select orders_status_id from " . TABLE_ORDERS_STATUS);]

    while (!$orders->EOF [&& $orders_status == "1"]) {
    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();
    }
    ?>
    </div>

  2. #2
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default Re: new order list on admin home

    sorry, i did more digging.... and found a thread about this. here is the code:
    <?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) where class = 'ot_total' order by orders_id DESC limit 7");

 

 

Similar Threads

  1. v154 Admin order list - in Finnish?
    By Cenkki in forum General Questions
    Replies: 0
    Last Post: 5 May 2016, 11:20 AM
  2. New listing on home page in list style
    By Greybeard in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Aug 2007, 04:26 AM
  3. New Orders on Admin Home
    By lviper in forum General Questions
    Replies: 5
    Last Post: 4 Jan 2007, 01:42 AM
  4. How can I format the Featured/New products list on the Home Page?
    By infocom in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 5 Oct 2006, 12:32 PM

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