How to Restrict Products by Specific Customer Groups in Magento 2?

How to Restrict Products by Specific Customer Groups in Magento 2?

As a Magento store owner, you come across situations where you need to restrict some section(s) of your store. You may want to display specific products to specific customer groups to make sure only the right products are displayed to the right users. For example, you have different products for wholesalers & retailers and want to restrict wholesale products to wholesale customers only and vice versa. You may also want to give a limited access to not logged in customers and so on. Hiding sections of your store to the right customers or customer groups will avoid unnecessary visits of irrelevant visitors and save the store resources.

How Magento 2 Restrict Products by Customer Group Extension Works?

You can create rules and apply conditions to it to hide/restrict pages, categories, and sub categories. Here is how you can do this.

To create a new rule, click ‘Add Rule’.

Under the ‘Main’ Tab

  • Enter the title of the rule
  • Set the rule’s priority
  • Select the store view by which you want to impose the restriction
  • Select the customer group by which you want to restrict access
  • Select a CMS page if you want to restrict a CMS page
  • Set the ‘Status’ to Enabled in order for the rule to be processed
  • Write a custom error message to display

restrict_products_customer_groups_magento2

Under ‘Conditions’ Tab

Add conditions to restrict certain pages or categories based on the attributes given in the drop down. In the example below, we have restricted ‘Bag’s category whose value is 4.


restrict_products_customer_groups_magento2

Redirect Restricted Users to other Pages

The extension gives the option to redirect restricted users to other pages of the store. For example, you can redirect retailers who are trying to access wholesale products to the retail product’s page.


restrict_products_customer_groups_magento2

Uses Cases with Examples & Demos

Magento 2 restrict products by customer group extension by FME allows merchants to restrict access to different sections of the store by different customer groups. It allows them to block specific content i.e. products, categories, sub categories, CMS pages etc. from selected customers/customer groups.The 4 most common uses cases are highlighted below.

  • 1: Restrict Category

    With Magento 2 restrict products extension, you can restrict any category by any customer group. The following example has restricted ‘Bags’ category. You have access to the other categories ‘Fitness Equipment’ & ‘Watches’.

    Example Demo:   Restrict Category | Buy Now

  • 2: Restrict CMS Pages

    Restrict one or more CMS pages such as ‘About Us’, ‘Privacy Policy’, ‘Customer Service’, Contact Us’ etc. In the example below, we have restricted the 'Privacy Policy' page.

    Example Demo:   Restrict CMS Pages | Buy Now

  • 3: Restrict Specific Products

    You can restrict specific products by specifying the attributes in the ‘Conditions’ tab. Following example restricts products whose ‘Climate’ attribute is ‘Cool’.

    Example Demo:   Restrict Specific Products | Buy Now

Got Questions? FME offers FREE lifetime support. If you have any questions regarding the extension, you can contact the support team by submitting a ticket here.