Did you upgrade from a previous Zen Cart version? Looking at the ZC v1.5.1 distribution version of /includes/modules/pages/products_all/header_php.php, the query is already restricted to only those products that are enabled, i.e. products_status = 1:
Code:
$products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,
p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
p.product_is_always_free_shipping, p.products_qty_box_status,
p.master_categories_id
FROM " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " . $order_by;
You might try using a file-comparison tool like WinMerge or Beyond Compare to see what's different between your files and the "stock" v1.5.1 version. The products_new page default header_php.php file also contains the "enabled products only" distinction in its SQL query.
Bookmarks