Jump to content

Apply restrictive rules in product categories access group conflict

Recommended Posts

Hello all,


I currently have two sets of categories for products. One is for categorizing the products, as you would normally do, and the other one is for restricting access for certain user groups. So, each product is in two categories: the normal one, and the one specifically for his group.


The thing is, each category has different group access permissions. In the normal category, everyone has access, while in the category for his group, only a certain user group can enter.

Independently, the two categories work like a charm. The problem arises when the permissions for the two categories conflict. Say, in the normal category everyone can enter, but in a concrete category a specific user can't (because I don't want him to).


But that user that has banned access to a certain product, can actually see it. That's because PrestaShop is applying the permissive rule: if the user has access to see the products in any category assigned to it, then the product is displayed.


I'd like to apply the restrictive rule: if a user doesn't have access to some category (it doesn't matter which), then the product is hidden.


How can I achieve this?

Thank you very much!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...