Table of Contents
View Magento 2 Force Login Extension Detail Page for Features and Demo
Documentation for Force Login
Preference
Using the Force Login extension, the store manager can disable the frontend page without logging in, so the customer has to log in to view the desired pages.
- Using this, store manager has an option to disable customer registration at your store.
- Using this, store manager has an option to set custom alert message which displayed on login page.
- User Friendly and flexible configuration.
- Easily Enable/Disable form admin.
This Extension allows you to Enable/Disable following pages.
- Product page.
- Category page.
- Cart page.
- Checkout page.
- Search page.
- Advanced search page.
- Contact page.
- CMS page.
- Custom Url.
- Admin can also hide third-party extension’s pages.
- Admin can set page to redirect after logging in.
Installation
There are two ways of installing extension in magento2.
- Using COMMAND LINE.
- Manually Install extension.
Option 1: Magento 2 install extension using COMMAND LINE (Recommended)
Follow below steps to install extension from the command line.
Step 1: Download the extension and unzip it.
Step 2: Upload it to code directory in your magento installation’s app directory If code directory does not exists then create.
Step 3: Disable the cache under System → Cache Management.
Step 4: Enter the following at the command line:
Php bin/magento setup:upgrade
Php bin/magento setup:static-content:deploy
Step 5: Once you complete above steps log out and log in back to the admin panel and switch to Stores → Configuration → Mageants → Forcelogin. the module will be displayed in the admin panel.
Option 2: Magento 2 install extension manually
Step 1: Download the extension and unzip it.
Step 2: Upload it to code directory in your magento installation’s app directory If code directory does not exists then create.
Step 3: Disable the cache under System → Cache Management Edit app/etc/config.php file and add one line code: ‘Mageants_Forcelogin.’ ⇒ 1
Step 4: Disable the cache under System → Cache Management
Step 5: Once you complete above steps log out and log in back to the admin panel and switch to Stores → Configuration → Mageants → Forcelogin. the module will be displayed in the admin panel.
Backend Example
- After Installation of Extension login to magento admin panel to setconfiguration of the extension.
- As per below screen shot you can set all the settings here.
Extension Configuration
- After Installation the Extension, Go to Store → Configuration → Mageants Extension →Forcelogin Configuration, Where Store Manager can set the options.
- As per below screen shots you can set page to display after logging in.
Frontend Example
- The Registration link will disappear in Top Link Section, By Disable Registration from admin.
- When a product is clicked it will ask for a login, while the Product Detail Page will be set as a Force Login by admin.
- Here the customer will be redirected to the login page, a custom alert message set by the administrator will be displayed here.