Some parts of a catalog are meant only for registered customers, for example trade products, members-only offers or products with special conditions. This module adds a “Login Required” switch to categories and products. Guests who open such a page are asked to log in first and are taken back to the page afterwards, and products that require a login do not show up for guests in product lists and search results.
Features
- “Login Required” switch on categories (in the “General” section of the category form) and on products.
- Guests opening a category or product page with “Login Required” are redirected to the login page and return to that page after logging in.
- Products with “Login Required” are hidden from guests in category product lists, in search results and in the layered navigation counts.
- The switch can be set per store view.
Configuration
There are no store settings. Set “Login Required” in the category or product edit page.
Good to know
Categories that require a login are still shown in the navigation; guests are asked to log in when they open them. Because hiding products uses the catalog search index, run a search reindex after installing the module.
Installation
Install the module with Composer in your Magento root directory:
composer require infrangible/m2-catalog-login-requiredThen enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.