Solved it ... persistence paid off again
replaced the code in my first post with this one:
Code:
// CATEGORY_RESTRICTION: test for restricted categories and subcategories and if found then don't show their products in the listing
$category_login_query_top = array(',',CATEGORY_RESTRICTION_LOGIN_CATEGORY); // finds must_login top category products
$category_login_query_sub = explode('_',CATEGORY_RESTRICTION_LOGIN_CATEGORY); // finds must_login subcategory products
foreach($category_login_query_top as $category_login_top);
foreach($category_login_query_sub as $category_login_sub);
if (isset($_SESSION['customer_id']) && isset($_SESSION['customers_privileges']) && $_SESSION['customer_id'] > 0 && $_SESSION['customers_privileges'] > 0) {
$block_top = '';
$block_sub = '';
} else {
$block_top = " AND p.master_categories_id != '$category_login_top' ";
$block_sub = " AND p.master_categories_id != '$category_login_sub' ";
}
.... rest of the file ....
and replaced
$block_these
with
$block_top
$block_sub
in the relevant 'where' statements
see the demo site
Now on to fix the sideboxes