Forums / General Questions / Admin index new orders listing - how to add 'order status_name'

Admin index new orders listing - how to add 'order status_name'

Locked

Views: 1,255

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
24 Sep 2007, 6:02 AM
#1
woodymon avatar

woodymon

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

9 Mar 2008, 8:28 PM
#2
x_o avatar

x_o

New Zenner

Join Date:
May 2007
Posts:
21
Plugin Contributions:
0

Re: Admin index new orders listing - how to add 'order status_name'

Woodymon, have you found the solution for "orders_status_name" in the "New Orders" column listing?