Thank you both for guiding me. I checked the logs and indeed there an error just MC12345678 stated it would be. I didn't have the logs enabled at first and for that I apologize to everyone.
I was able to sort it out and that is in part thanks to you. I also realized, I was not adding the code to the right section of the page.
For those who are curious
I created a new drop down
HTML Code:
// prepare order-priority pulldown list
$priority = array(array('id' => 'ot_priority_handling_categoryX', 'text' => Category X - Priority 1'),
array('id' => 'ot_priority_handling_2CategoryX', 'text' => 'Category X - Priority 4'),
array('id' => 'ot_priority_handling_3CategoryY', 'text' => 'Category Y Priority 1'),
array('id' => 'ot_priority_handling_4CategoryY', 'text' => 'Category Y Priority 4'));
Then below
HTML Code:
<div class="form-group col-xs-4 col-sm-3 col-md-3 col-lg-3">
<?php echo zen_draw_form('status', FILENAME_ORDERS, '', 'get', '', true);
echo '<label for="selectstatus" class="sr-only">' . HEADING_TITLE_STATUS . '</label> ' . zen_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), (int)$_GET['status'], 'class="form-control" onChange="this.form.submit();" id="selectstatus"');
echo '</form>';
?>
</div>
I added..
HTML Code:
<div class="form-group col-xs-4 col-sm-3 col-md-3 col-lg-3">
<?php echo zen_draw_form('priority', FILENAME_ORDERS, '', 'get', '', true);
echo '<label for="priority" class="sr-only">' . HEADING_TITLE_priority . '</label> ' . zen_draw_pull_down_menu('priority', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $priority), $_GET['priority'], 'class="form-control" onChange="this.form.submit();" id="priority"');
echo '</form>';
?>
</div>
Then above
HTML Code:
// Only one or the other search
// create search_orders_products filter
$search = '';
$new_table = '';
$new_fields = '';
if (isset($_GET['search_orders_products']) && zen_not_null($_GET['search_orders_products'])) {
I added
HTML Code:
// Only one or the other search
// create search_orders_products filter
$search = '';
$new_table = '';
$new_fields = '';
if ($_GET['priority'] != '') {
if ($_GET['priority'] == 'ot_priority_categoryX') {
$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, 'See Order Details' 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)" . "
left join " . TABLE_ORDERS_PRODUCTS . " op on (o.orders_id = op.orders_id)" . "
where ot.class like '%ot_priority_handling%' and o.orders_status = s.orders_status_id and (o.orders_status = '1' or o.orders_status = '2') and (op.products_id = '9' or op.products_id = '16' or op.products_id = '10' or op.products_id = '13') and s.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
$search . " order by o.orders_id DESC";
} elseif ($_GET['priority'] == 'ot_priority_categoryY') {
$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, 'See Order Details' 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)" . "
left join " . TABLE_ORDERS_PRODUCTS . " op on (o.orders_id = op.orders_id)" . "
where o.orders_status = s.orders_status_id and (o.orders_status = '1' or o.orders_status = '2') and (op.products_id = '9' or op.products_id = '16' or op.products_id = '10' or op.products_id = '13') and s.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
$search . " order by o.orders_id DESC";
// Category Z
} elseif ($_GET['priority'] == 'ot_priority_categoryZ') {
$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, 'See Order Details' 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)" . "
left join " . TABLE_ORDERS_PRODUCTS . " op on (o.orders_id = op.orders_id)" . "
where ot.class like '%ot_priority_handling%' and o.orders_status = s.orders_status_id and (o.orders_status = '1' or o.orders_status = '2') and (op.products_id = '3' or op.products_id = '5' or op.products_id = '4' or op.products_id = '11') and s.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
$search . " order by o.orders_id DESC";
} elseif {......
Bookmarks