24 Sep 2007, 6:02 AM
Totally Zenned
- Join Date:
- Sep 2004
- Posts:
- 2,309
- Plugin Contributions:
- 1
Admin index new orders listing - how to add 'order status_name'
I've edited /admin/index.php so the payment method displays in the "New Orders:" column listing.
<?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, o.payment_method as payment_module_code, 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 20");
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>' . ' #' . $orders->fields['orders_id'] . '</span><span class="center">' . $orders->fields['order_total'] . '</span><span class="rigth">' . "\n";
echo zen_date_short($orders->fields['date_purchased']);
echo ' ' . $orders->fields['payment_module_code'];
But I'm a bit stumped on how to add the "orders_status_name" to the same listing. That is how to edit the select SQL to join s.orders_status_name from the TABLE_ORDERS_STATUS
Any suggestions? thanks.
Woody