well, I have come back to this and I am sure that in
\includes\index_filters\default_filter.php
this is the query that populates the drop down.
I have manufacturers as a master category.
My question is, what do I need to put (a verbal description will do, not tested code!) to return only the subcategories belonging to that manufacturer in question but NOT any linked categories?
PHP Code:
// optional Product List Filter
if (PRODUCT_LIST_FILTER > 0) {
if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] != '') {
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
TABLE_CATEGORIES . " c, " .
TABLE_CATEGORIES_DESCRIPTION . " cd
where p.products_status = 1
and p.products_id = p2c.products_id
and p2c.categories_id = c.categories_id
and p2c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'
order by cd.categories_name";
}
thanks
Steve
Bookmarks