User Guide of Magento 2 Restrict Products by Customer Group Extension

At the backend, go to FME EXTENSIONS > Configurations. Here you can find the extension configurations.

General Configurations

  • Enable in Frontend: Enable/Disable Restrict Products by Customer Group module.
  • Excluded IP: Enter the IP addresses that will have access to restricted elements on the frontend.

general.jpg

How to Manager Restriction Rules?

At the back end, go to FME EXTENSIONS > Manage Rules. Here you can find the grid with all your custom created fields. Click on Add Rule to continue.

add rule.jpg

Now here you have to provide the following information.

RULE INFORMATION

  • Title: Enter a suitable title for the new rule you want to create.
  • Priority: Set priority for this rule with 1 as the highest and 0 as the lowest.
  • Store View: Select one or more store views to apply this rule to.
  • Customer Groups: Select one or more customer groups on which you want to apply this rule.

new rule.jpg

  • Start Date: Enter the date when this rule applies.
  • End Date: Enter the date when this rule ends.
  • Status: Enable/Disable this rule.

date.jpg

  • Restricted Customer Response: Here you have the following two options:

    • Error Message: Enter a custom message for blocked/restricted customer groups in the Error Message box.

error message.jpg

  • Redirect: Redirect blocked customers/customer groups to another page by adding the redirect URL.

redirect.jpg

Products > Create Rules for Products

Select the rules which you want to apply to the products.

rules.jpg

CMS Pages > Select Pages to Apply Rule

Select CMS pages on which you want to apply created rules.

cms.jpg

Categories > Select Categories

Select categories on which you want to apply created rules.

categories.jpg

URL Conditions > Provide URL(s) for Redirection

You have the option to redirect pages to different destinations. If you want to redirect multiple pages to various sources, you can add their URLs and corresponding redirection links as shown in the image below.

redirection.jpg

Blocks

You can hide blocks on any webpages or for specific customer groups.

blocks.jpg

Restricted Product

When a user visits a restricted product on the store, they will either see an error message or be redirected, depending on back-end configurations. For example, in the screenshot below, a restricted product displays an error message.

restricted.png

Product Restricted from Search Result Pages, Wishlist & Add to Compare Page

add to compare.jpg

Product Restricted from Related, Upsell, Cross Sells

Restricted products will not appear in related, up-sell, or cross-sell sections based on back-end configurations.

related.jpg