[MOD] Block access to Brands page if info not viewable
Posted: Tue Jan 11, 2011 11:08 pm
An annoyance for ISC is that if you set your store configuration so that brand information is not displayed, it's still possible for a visitor to go to the brands.php page and start looking through your product brands information and potentially get information on where you're sourcing your products (particularly annoying if your competitors are viewing).
This mod, resolves that by providing a 404 error if the configuration variable for:
Admin > Store Settings > Display > Show Product's Brand? is set to No
Open: includes/classes/class.brands.php
Find:
Before, Add:
This mod, resolves that by providing a 404 error if the configuration variable for:
Admin > Store Settings > Display > Show Product's Brand? is set to No
Open: includes/classes/class.brands.php
Find:
Code: Select all
$brand = MakeURLNormal($brand);
// Get the link to the "all brands" page
$GLOBALS['AllBrandsLink'] = BrandLink();
Code: Select all
// MOD: Show 404 if show brands is not enabled
if(!$GLOBALS['ISC_CFG']['ShowProductBrand']) {
$GLOBALS['ISC_CLASS_404'] = GetClass('ISC_404');
$GLOBALS['ISC_CLASS_404']->HandlePage();
exit;
}
// MOD END