Under the reports menu in your Zen Cart admin you have a report called “Product Low Stock”. This report is really less than helpful because it simply contains all of your products sorted by quantity. In this tutorial I will show you how to edit the admin/stats_products_lowstock.php to show only products with status 1 OR only products with a quantity less than 1.
Around line 78 you will find this query.
If you change it to
$products_query_raw = “select p.products_id, p.products_status, pd.products_name, p.products_quantity, p.products_type from ” . TABLE_PRODUCTS . ” p, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_id = pd.products_id and pd.language_id='” . $_SESSION[‘languages_id’] . “‘ AND p.products_quantity<=’0’ order by p.products_quantity, pd.products_name”;
Then you will get ONLY products with a quantity greater than zero.
If you change it to
$products_query_raw = “select p.products_id, p.products_status, pd.products_name, p.products_quantity, p.products_type from ” . TABLE_PRODUCTS . ” p, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_id = pd.products_id and pd.language_id='” . $_SESSION[‘languages_id’] . “‘ AND p.products_status=’1’ order by p.products_quantity, pd.products_name”;
Then you will get ONLY products with an active status of 1.
These are much more helpful options for this report.