Hi Everyone,
I am working on developing a seach function in Orders Module of ZC 1.51 to be able to filter priority handling orders and process them prior to regular orders. So, I downloaded and install the Priority Handling module and it works great. Saddly, there is no search/filter function to help agents sidentify and process those orders at a glance.
So I started building my own and for now parts of the code will be hard coded. Any help is greatly appreciated.
What I would like to do is create a drop down list as a search list and then be able to filter futher by order status. Similar to search by product or customer info.
The code below allows me to have a drop down list but I can only use it as a filter status/priority. I need to compound that search instead of one or the other
...........................
// prepare order-priority pulldown list
$priority = array($priority_array);
$priority_array = array();
..................
<tr><?php echo zen_draw_form('priority', FILENAME_ORDERS, '', 'get', '', true); ?>
<td class="smallText" align="right">
<?php
echo PRIORITY . ' ' . zen_draw_pull_down_menu('priority', array_merge(array(array('id' => 'ot_priority_handling', 'text' => 'Priority
Handling')), $priority), $_GET['priority'], 'onChange="this.form.submit();"');
echo zen_hide_session_id();
?>
</td>
</form></tr>
..............................
Code that needs to be worked on or changed is below but works as a filter now
..............................
//echo '<BR><BR>I SEE ABC: ' . $orders_query_raw . '<BR><BR>';
} elseif ($_GET['priority'] != '') {
$priority = zen_db_prepare_input($_GET['priority']);
$orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified,
o.currency, o.currency_value, s.orders_status_name, ot.class, ot.title, 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 ) " . "
where ot.class like 'ot_priority_handling' and o.orders_status = s.orders_status_id" .
$search . " order by o.orders_id DESC";
Bookmarks