Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Age Verification for Magento 2

    Age verification for Magento 2, is a must needed module for the store owner who wants to sell the products to a particular age group of the customers.

    With the help of this module, the admin can restrict the users to access the store from the store category, cms pages, and the product page. Then a pop-up will show to the user to confirm the age.

    Now, the users can confirm the age by providing the date of birth then access the restricted page easily.

    features

    • Upload custom image for the pop-up
    • The admin can manage the pop-up content setting
    • Select methods to verify users age – checkbox, date of birth, yes/no
    • The admin can enter the custom text for Enter and Leave buttons
    • The admin can set the Leave button URL
    • Set where to apply the module – products, categories, or cms pages
    • Customizable design – width, button color, background color, text color

    Installation

    Customers will get a zip folder then they have to extract the contents of this zip folder on their system. Then, the extracted folder has an src folder, inside the src folder you have the app folder.

    You need to transfer this app folder into the Magento2 root directory on the server as shown below.

    Installation-1

    After the successful installation, then you have to run these commands in the Magento2 root directory.

    First command- php bin/magento setup:upgrade

    command-1

    Second Command – php bin/magento setup:di:compile

    command-2

    Third Command – php bin/magento setup:static-content:deploy

    command-3

    After running the commands, you have to flush the cache from the Magento admin panel by navigating through System>Cache management as shown below in the snapshot-

    cache management

    Language Translation

    For translating the module language, navigate through src/app/code/Webkul/AgeRestriction/i18n then edit the en_US.csv file.

    Now rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. Then after editing the CSV, save it.

    Now upload the file to the path src/app/code/Webkul/AgeRestriction/i18n which already have Magento2 installed, on the server.

    Now the module will be translated into the Arabic Language which supports RTL & LTR languages.

    webkul-magento2-language

    Module Configuration

    The admin can configure the module from the back-end easily. To configure the module, the admin can navigate to Stores> Configuration> Age Verification

    Note: For configuring the entire module, the admin needs to select Default Configuration by using Store View.

    general settings

    Here, the admin can-

    • Enable or Disable the module from the back-end.
    • Select the Store View(multiple store view can be selected at a time)
    • Upload the image to show on the front end on the pop-up screen.

    Content: In the content section, the admin can-

    • Enter the title for the pop-up
    • Enter the pop-up content title/ Description
    • Select the method to verify user age-
      The admin can select the different type of method to verify the user age as: Date of Birth, Checkbox Option, and Yes/No button 

    content setings

    • Select the format of date of birth.
    • The will enter the age required for the age confirmation
    • The text which will be shown on the button
    • Enter the text for the leave button.
    • Enter the url for the leave button.

    Display Setting: In the display section, the admin can configure the module where the age restriction should be applied then-

    Display settings

    • Select yes, if you want to apply age restriction on CMS Pages and after that, the admin can select the CMS pages where he want to apply age restriction.
    • The admin can select if, the age verification should be applied on the Categories
    • The admin can decide if, the age verification should be applied to the Products.

    Design: The admin can set the design for the pop-up. Here, the admin can-

    Design settings

    • Set the pop-up width by entering the pop-up width value between the range 200-1000
    • Enter the color for the pop-up background.
    • Enter the color for the text.
    • The admin can set what should be the button color.
    • the admin can enter the text color for the button.

    Configure Store View

    Similarly, the admin can configure particular store view by navigating through Stores> Configuration> Store View. 

    store view

    By using the Store View the admin can select the particular store view which he wants to configure.

    Store view settings

    Note: After selecting a particular store view the admin can configure only the Content and Design settings for that store view. 

    Age verification on the product page

    The admin can enable or disable the age verification on the product page. To manage the age verification on the product page the admin can navigate to catalog> products

    product page navigation

    Now select the product for which the admin wants to enable the age verification then click on the edit button as shown in the image below-

    select product for age verification

    Now the admin can enable or disable the age verification then click on the save button as shown in the image below-

    webkul-magento2-age-verification-admin-product-page-3

    Age verification on the category page

    The admin can enable or disable the age verification on the category page. To manage the age verification on the category page, the admin can navigate to catalog> categories

    navigate to the category

    Now the admin can select the category for which the admin wants to enable or disable the module as shown in the image below-

    age-verification

    Front-end view

    Age Verification on the Product Page- When age verification is applied to the product page, the customer can’t access to that product page until the customer verifies the age according to the applied age restriction.

    Verification

    After verifying the age, the customer can access that product page then shop for that particular product too.

    access product page

    If the customer clicks on the Leave button, then the customer will be redirected to the URL which is set by the admin.

    webkul.com

    Note: The layout of the age verification pop-up will change in terms of Content and Design, according to the select Store View but the method will remain same.

    store view popup

    Age Verification on the Cateogy Page- Now, when the age verification is applied to the category page then the customers will not be able to access that category page until the customer verify the age-

    age verification on category page

    After verifying the age according to the set by the admin, the customer can access to that particular category-

    access category page

    If the customer clicks on the Leave button, the customer will be redirected to the URL which is set by the admin.

    webkul.com

    Age Verification on the CMS Pages- Not only category, product, but also cms pages can be restricted using this module. The admin can apply the age verification for the cms pages too.

    age verification on the cms page

    That’s all for Age Verification For Magento2Still, have any issues please raise a ticket or get back to us at support@webkul.com

    Current Product Version - 3.0.0

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x, 2.3.x

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close

    Table of Content

    Hide Index