User Guide of Magento 2 Age Verification Extension
General Configurations
At the backend, go to FME EXTENSIONS > Configurations. Here you can find the extension configurations.
- Module Enable: Option to enable or disable the age verification module
- Select Template: Select from any of the 10 templates. Each template comes with its own design.
- Template Title: Enter a title for the selected template e.g. Age Gate
- Template Description: Enter a short description for the template
- Store Image: Upload an image for the template
CMS Page Configuration
This section allows you to apply the age verification popup for categories, cart and checkout pages.
- CMS Page: Select the CMS pages on which you want to enable the age verification
- Show on Checkout Cart: Select ‘Yes’ or ‘No’ to Enable/Disable the age verification gate on the checkout cart
- Show on Checkout Main Page: Select ‘Yes’ or ‘No’ to Enable/Disable the age verification gate on the checkout main page
Configuration Options
This section allows you to customize the age verification popup.
- Buttons/Date: Choose the method by which you want to record the age verification consent by the customers:
- Date
- Button/Checkbox (Use a checkbox or button to log age verifications)
If you select the ‘Button/Checkbox’ option, then the following fields will appear at your screen:
- Enable Checkbox: Option to Enable/Disable the checkbox to verify age group
- Enter Text For Continue Button: Enter a text for the continue button
- Enter Text For Restriction Button: Enter a text for the restriction button
- Enter Text For Close Button: Enter a text for the close button
Restriction Settings
- Enter Age For Restrict: Enter the user age you want to restrict e.g. 17
- Redirect CMS Page: Select a CMS Page for redirection
- Restriction Time in Minutes: Set restriction time in minutes
- Show Popup Time in Seconds: Specify the number of seconds when age verification redirection would occur.
How to Enable Age Verification for Specific Products?
At the back end, go to CATALOG > Products. Here you will find all the store products in a grid. Click on the Edit button or click on the Add Product button to continue.
Now scroll down the page and Enable the Age Verification option.
How to Enable Age Verification for Specific Categories?
At the back end, go to CATALOG > Categories. Here you will find all the categories of your store. Now just enable the Age Verification option.
Frontend
Age Verification Popup
GraphQL APIs
1. Fetches configuration details for the age verification feature.
Query
{
age_verification {
template
template_title
template_description
cms_pages
show_on_checkout_cart
show_on_checkout_main_page
configuration_option
enable_check_box
text_for_continue_button
text_for_restriction_button
text_for_close_button
age_for_restrict
redirect_cms_page
restriction_time_in_minutes
show_popup_time_in_seconds
text_for_check_box
}
}
2. Fetches specific product details with a custom age verification field.
Query
{
products(filter: { sku: { eq: "24-MB03" } }){
items {
custom_attribute_ageverification
sku
name
}
}
}