Discovered that the new products centerbox that appears on the main page of Zen Cart doesn't "hide" products in hidden categories... This is something that I never realized was happening because I always turn this showing new products on the main page.
I'll be submitting an update to hideCategories with the correction (don't ask when.. It's the holiday season and I'm crazy busy.. I'll post the update when I get some time..), but in the meantime it's an easy fix to make yourself if you like..
FIRST create an override. Copy includes/modules/new_products.php to includes/modules/YOUR_TEMPLATE
Starting around line 23 in the includes/modules/YOUR_TEMPLATE/new_products.php file find this:
Replace that entire block with this:Code:$new_products_query = "select distinct p.products_id, p.productsi_image, p.products_tax_class_id, pd.products_name, p.products_date_added, p.products_price, p.products_type, p.master_categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p.products_status = 1 " . $display_limit;
Done..Code:// Begin hideCategories modifications - this hides hidden categories from the New Products centerbox on main page $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, p.products_date_added, p.products_price, p.products_type, p.master_categories_id from (" . TABLE_HIDE_CATEGORIES . " h, " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id ) where p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and (p.master_categories_id = h.categories_id and h.visibility_status !=2) and p.products_status = 1 " . $display_limit; // End hideCategories modifications - this hides hidden categories from the New Products centerbox on main page![]()


Reply With Quote
