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>



