I find myself at loss again. Possibly, I am not thinking straight for two days. Here is my issue of the week:
I have three teams each team looks after specific product/product category. So when an order comes in for product (e.g. Running Shoes) or category Shoes, team Footwear will filter the orders page (on admin side) to view orders that pertains to footwear or a running shoes and can filter based on rush order or not.
I had a simple hard coded filters in version 1.5.1 that was working but it doesn't work well into 1.5.5
Below is a snippet of the select statement. What you don't see is that I have a drop down box that is defined earlier in the page to define the priority and category example
Footwear - Rush Orders
Footwear - Regular Orders
When I run the above snippet, I get "WARNING: An Error occurred, please refresh the page and try again."HTML Code:($_GET['priority'] == 'ot_priority_handling_categoryX1') { $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"; }
Any help would be greatly appreciated on figuring out where I went wrong.
P.S, As you go through the code, you will notice that I am only filtering for orders that are pending or in progress. I did not want to show completed or canceled orders.


Reply With Quote
