Zen Follower
- Join Date:
- Jul 2011
- Posts:
- 167
- Plugin Contributions:
- 0
Category Specific Access Restriction (CSAR) - [Support Thread]
Applied and verified.
That simple fix appears to have solve the circumvention problem.
I'll still need to look at what Im doing wrong that I have not been able to restrict by manufacturer id only. Either it might be a merge problem or usage problem.
One thing to note for the benefit of other users of this mod.
It's a little obvious, but it I still think it should be mentioned.
CSAR can only protect categories and its items only if the product's master category ID is under the restricted category. It will have no affects on products that are linked to a restricted category, but the master category is in a nonrestricted category.
frank18:
Yep, I could reproduce that.
Open the file /includes/templates/MY_TEMPLATE/templates/tpl_product_info_display.php, find
if ([B]!$_SESSION['customer_id'] && [/B]!$_SESSION['customers_privileges'] > 0 && in_array($result->fields['master_categories_id'],explode(',', CATEGORY_RESTRICTION_LOGIN_CATEGORY)) ) {
// block access to this product
echo TEXT_ILLEGAL_ACCESS ;
>
> removed the part in red, change to
>
> ```
if (!$_SESSION['customers_privileges'] > 0 && in_array($result->fields['master_categories_id'],explode(',', CATEGORY_RESTRICTION_LOGIN_CATEGORY)) ) {
// block access to this product
echo TEXT_ILLEGAL_ACCESS ;
It is marked for the next updated version.
Sorry, I can't reproduce this, you may want to check for merging errors. Products by manufacturer works fine in a few test sites and also on a live 1.5.5a store.