Age Verification for Magento 2

Age Verification

Introduction

The extension allows to prohibits underage visitors from visiting some page of your website. Create unlimited age verification with three different layouts (checkbox and buttons) and display it at any page of your site.

Installation

The extension has 2 separate ways of installation, via Composer or by copying the code.

Please follow this Installation Guide to install the extension.

Extension Configuration

Configuration Settings

To access the configuration settings of the extension, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ Age Verification.

The module’s configuration contains only one section where store administrator can enable or disable the extension in the storefront.

General

Set Enable the extension - to "Yes" to enable the extension in the storefront

Managing Age Verifications

The extension allows store administrator to manage all age verifications in the admin panel. To view, edit or create new age verification, please go to CONTENT ⟶ Age Verification by Ulmod ⟶ Manage Age Verifications. All age verifications are displayed on the grid. The mass actions allow managing age verifications quickly.

Note: during the initial setup this grid will be empty.

To create a new item click "Add New Verification" button. The Age Verification contains five sections: General, Display on Pages, Display on Categories, Display on Products and Display on Other Pages.

General

Under the General section :

Set Enable to "Yes" to enable the age verification in the storefront.

Enter the Name of the age verification for internal reference.

In the form/To Date set a time interval, when an age verification is activated.

Set Store View to the view where the age verification will be available.

In the Customer Group selects the customer groups the Age Verification will be displayed.

The Layout Type allows choosing the type of layout to display the age verification.

If Date Of Birth is selected, the store administrator can set the following :

  • Date Of Birth Content - specify the content to appear in age verification block. Please do not add CSS class, ID or any HTML attribute on each element.;
  • Agree Button Text - specify the text to appear on the agree button. Eg. '18+ Enter';
  • Min Age required - enter the minimum age number required. Eg. 18;;
  • Cookie Lifetime (in days) - enter the total time in (days) cookie is stored. Eg 165. Default: 365 days;

If Buttons is selected, the store administrator can set the following :

  • Button Content - specify the content to appear in age verification block. Please do not add CSS class, ID or any HTML attribute on each element.;
  • Agree Button Text - specify the text to appear on the agree button. Eg. '18+ Enter';
  • Disagree Button Text - specify the text to appear on the disagree button. Eg. 'Under 18';
  • Disagree Message - specify the message to display on failed verification. Eg. 'Sorry, you are not old enough to view this site';
  • Cookie Lifetime (in hour) - defines the total time in (hour) cookie is stored. Eg 24;

If Checkbox is selected, the store administrator can set the following :

  • Checkbox Content - specify the content to appear in age verification block. Please do not add CSS class, ID or any HTML attribute on each element.;
  • Checkbox Text - specify the text to appear on checkbox label. Eg. 'I'm at least 18 years old';
  • Cookie Lifetime (in hour) - defines the total time in (hour) cookie is stored. Eg 24;

Show Regulation - set to "Yes" to show the regulation text on age verification block or "No" to hide it. If "Yes", please specify the Regulation Text to appear in the block;

The Leave Url specify the URL visitors will be redirected after clicking on "Leave" button. Eg "https://www.google.com/"

In the Leave Text specify the text to appear on the leave button. Eg "Leave".

In the Footer field, specify the content to appear in the footer of age verification block.

Define the age verification popup width in pixels.

In the Custom CSS field, insert a custom CSS to adjust/override the default age verification design (eg. background, text, link and buttons colors). Leave blank to use the default design.

You can also add that adjust/changes colors styles at your custom theme.

Choose your color picker from this guide and make sure to prefix each color with "#". eg #FFFFF

Background and Text Colors:

 .um-ac-verify,.um-ac-not-verify,.um-ac-not-verify.um-ac-layout2 {color: #FFFFFF;background: #000;} .um-ac-layout2 .pop-cont p.small,.um-ac-layout3 .pop-cont p.small {color: #FFFFFF;} 

Buttons Color:

 .um-ac-layout3 #enter, .um-ac-layout3 #leave-url, .um-ac-layout2 #enter, .um-ac-layout2 #no,.um-ac-layout3 .um-ac-footer,.um-ac-layout2 .um-ac-footer, .um-ac-layout2 #leave-url,.um-ac-layout2 .um-ac-content h2, .um-ac-layout3 .um-ac-content h2 {color: #FFFFFF; background: #009688;} 

Links Color:

 #um-ac-footer-layout2 a,#um-ac-footer-layout3 a {color: #94FFD4;} 

In case you can not adjust/change the age verification design (eg. colors etc.) by yourself, please contact our support team at [email protected], we will help out with that.

Display on Pages

Under this section, the store administrator can choose the pages to Display age verification block. To select more than one, hold the Ctrl key down and select each option.

Set Display On Cart Page to "Yes" to display age verification on the cart page.

Display on Categories

Under this section, the store administrator can choose the categories to display age verification block. To select more than one, hold the Ctrl key down and select each option.

Display on Products

Under this section, admins can choose the products to display age verification block.

Display on Other Pages

Under this section, store administrator can copy one of the predefined codes and paste it into either the content editor of a CMS page or static block (for template tag), a template file (for template code), a Layout XML file or a Custom Layout Update XML field (Layout XML code).

Preview

Once the age verification settings are completed, store administrator can preview the Age verification by clicking on the "Preview" button.

Frontend View

Once age verifications are created, they will display in the storefront on the selected pages.

Example of Age Verification Layout 1 (Date of Birth)

Example of Age Verification Layout 2 (Buttons)

Example of Age Verification Layout 3 (Checkbox)

Responsive design

The extension is responsive to mobile devices and works great regardless of the type of screen or device used to view your store

Extension Support

Need Help?

Ulmod Support team is always ready to assist you, no matter which part of the world you are in. If something does happen and you think you might be experiencing an issue or bug, please contact us via [email protected] or submit a ticket from our Helpdesk Ticket and we will help you out.

Got Questions?

Should you have any questions or feature suggestions, please Contact Us. Your feedback is welcome!

Extension Product Page