Table of Contents
View Magento 2 Customer Approval Extension Detail Page for Features and Demo
Documentation for Customer Approval
Preference
Customer Approval extension allows you to restrict customers from logging into your website without prior approval. This is particularly helpful when you want to verify the customer's details before giving them access to the website. It can also be used to force the customers to login before they can make a purchase by disabling Guest Checkout which is a standard feature in Magento.
- The extension allows you to redirect customers to any URL internal or external.It also allows you to configure the extension for your store to send email notifications to the admin upon account creation and to the customer upon approval and rejection of the customer application. Email templates for admin notification, customer approval and rejection come with the extension. Custom emails templates can be created using the Transactional Emails feature in Magento. The extension is configurable at the store view level allowing you to have different settings for different stores in your multi store setup.
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 → Customer Approval, 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_Customerapproval’ → 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 → Customer Approval, the module will be displayed in the admin panel.
Backend Example
After Installation of Extension login to magento admin panel to set configuration of the extension.
As per below screen shot you can set all the settings here.
Extension Configuration
You can find configuration at Stores → Configuration → Mageants → Customer Approval.
General
- Enabled: Select Yes/No to Enable/Disable the extension respectively. This can be configured at a store view level if you have a mutli store setup.
- Auto Approve Customer Account: Select Yes approve customer account upon registration. Accounts approved can be rejected in the admin.
EMAIL SETTINGS
- Notify Customer when approved or rejected: Select Yes to notify the customer when their account is approved or rejected.
- Email Sender: Select the email sender you wish to send the emails to the customer. Magento email senders can be configured by going to Stores → Configuration → Store → Store Email Addresses,specify the contact name and email address for the contacts.
- Approved Email Template: Select the email template to use when customer is notified that their account has been approved. A default email comes with our extension package. You can also override the email by creating a transactional email of your own by going to System → Transactional Emails, creating your own email template by selecting the Customer Approved Template in the drop-down under Load default template fieldset. Once you've saved the new transaction email go back to System → Configuration → Mageants → CustomerApproval. Select the new template for the field Approved Email Template.
- Rejected Email Template: Select the email template to use when customer is notified that their account has been rejected. You can override the default template by following the steps mentioned in Approved Email Template except that select Customer Rejected Email Template in the dropdown under Load default template fieldset.
REDIRECT SETTINGS
- Redirect Customers: Select Yes to redirect the customers to a different page when their account has not been approved. This can be either a CMS page or any internal or external URL.
- Unapproved Customer Message: This message will be displayed when the customer tries to login and their account has not been approved.
- Custom Redirect URL: Enter the URL to the page unapproved customers will be redirected to.
- ADMIN NOTIFICATION: Notify Admin after account creation: Select Yes to notify the admin of the new registration.
- Email Sender: Select the email sender from list of email senders available in magento. To configure please check Email Sender under Email Settings explained above.
- Email Template: Select the email template you want to use to send to the admin when a customer registers on the site. You can override the default template by following the steps mentioned in Approved Email Template except that select Account registration admin notification in the dropdown under Load default template fieldset.
- Recipients: Enter admin email(s) separated by a comma(,).
Example: johndoe@example.com, janedoe@example.com
ADMIN NOTIFICATION: Notify Admin after account creation:
Customer Page
APPROVE / REJECT CUSTOMERS
- To approve / reject customers go to Customer > All Customers. There are three ways to approve or reject customers.
1. Click on the Approve / Reject options to Approve / Reject the customer corresponding to the grid row.
2. On the customer edit page, click on Approve button to Approve customer and Reject button to Reject customer.
3. To Approve / Reject customers in batch, go to Customers > All Customers. Select the customers by selecting the check-boxes on Corresponding to the customers you want to Approve / Reject. Each row Click OK in the pop-up if you want to Approve / Reject.
Frontend Example
- Redirected Page After Registration
- Displays message which is specified in Store Configuration.
Login Page
- Display message that customer is Pending or Rejected, if customer will try to Login before approval.