Hello
Is it possible to filter the data on category? Rather than displaying the filtered results, clicking on a category redirects me to the admin home page
Hello
Is it possible to filter the data on category? Rather than displaying the filtered results, clicking on a category redirects me to the admin home page
just updating the correct code for this
Replace
<form method="get" action="<?php echo zen_href_link(FILENAME_STATS_INVENTORY_REPORT, 'page='.$get_page.'&dir='.$replace_dir.'&sort=replace_sort', 'SSL'); ?>"><?php echo zen_draw_pull_down_menu('cat', zen_get_category_tree(), $cat, 'onChange="this.form.submit();"'); ?></form>
with
<form method="get" action="stats_inventory_report.php"><?php echo zen_draw_pull_down_menu('cat', zen_get_category_tree(), $cat, 'onChange="this.form.submit();"'); ?></form>
</form>
Also to show only the enabled products change code to
$products_query_raw = "SELECT p.products_id, p.products_quantity, pd.products_name, p.products_model, p.products_price, (p.products_quantity * p.products_price) AS total, cd.categories_name, p.products_cost, m.manufacturers_name
FROM " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id
LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON p.master_categories_id = cd.categories_id AND cd.language_id = '" . $lang_id . "'
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON p.manufacturers_id = m.manufacturers_id
" . $db_category_where . "
GROUP BY p.products_id, pd.products_name
HAVING p.products_status = '1'
ORDER BY " . $sort . " " . $dir;
thanks
Last edited by nishajh; 9 May 2024 at 03:21 AM.
Bookmarks