How to create age verification popup

modal popup age verification prestashop

In this tutorial i want to show you how you can create age verification popup with multi-tool to create popups in e-commerce pages based on PrestaShop engine. This tool is called PopUp Pro - and at the moment it is the most popular and powerful addon to create responsive popup box in your online store.


Why age verification?

In some countries it is necessary to display age verification window on website, especially when website contains adult materials (cigarettes, alcohol etc.). So if you're online store owner and if you sell adult stuff to meet law requirements you have to create age verification tool. It's more than necessary from law point of view.

 

How to create age verification window?

As I already mentioned i will show how to achieve it with PopUp pro module to create responsive modal popups.  So, please install addon and go to module configuration page. On module configuration page please open "add new popup" section where you can define popup specification. Exactly as i show on image below. 

 

popup pro prestashop add new popup window

Popup pro module configuration page

 

Age verification Popup Configuration

Now it's time to next step. Please fill out all necessary fields like name, active, test mode etc. The most important part is a section where we will display buttons to accept / decline notification about age restriction. It's a code of the popup. To create popup like here (click to see image) you have to use configuration:

Name Age Verification
Active Yes
Test Mode No (optionally YES when you want to test it)
Display again 36000000
Popup Border 5
Popup border color FF7575
Popup background FFFFFF
Overlay backgrund 000000
Overlay opacity 0.8
Disable "close" YES
Disable "click anywhere" YES


And the most important part, the code.  please use it in "desktop view" code, but you can also use it for other devices (tablet and mobile)

Width 600
Height 300

 

<h1 style="text-align: center;"><span style="color: #ff0000; background-color: #ffffff;"><strong>Adult content - access restricted</strong></span></h1>
<h2 style="text-align: center;">Please confirm that you're over 18<br />or leave the website<br /><br /></h2>
<div>
<table style="width: 600px; text-align: center; margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<td style="text-align: center;"><a style="width: 130px; text-align: center;" class="button lnk_view btn btn-default" onclick="hideThisPopup();"><span>I'm over 18</span></a></td>
<td style="text-align: center;"><a style="width: 130px; text-align: center;" class="button lnk_view btn btn-default" href="http://mypresta.eu"><span>Exit</span></a></td>
</tr>
</tbody>
</table>
</div>

And that's all! Your page will have not age veriification popup with feature to remember selection, close popup (if user is over 18) or exit the website )if user is not over 18). Of course you can define own content and own different buttons. For example, you can add own fancy images, backgrunds, even add sounds etc. It's because of extended tinyMCE editor that allows to add everything to popup window! You can see video of the popup below.

 

 

author milos myszczuk
Article by Milosz Myszczuk PrestaShop expert, official PrestaShop community moderator. PHP developer, specialist in relative and spatial databases management, GIS Analyst, CEO & founder of VEKIA interactive agency. Read more about VEKIA company
If you like my articles and want much more valuable tips, feel free to send me donation
1.4 version 1.4.11 1.6 404 addon admin advertise ahref ajax alpha animation api app application authentication back office backup badge banner basics block bootstrap button cache carrier cart catalog category certificate changelog chat class clear client clip cms code colors columns comments configuration contact container content controller cookie counter country coupon css csv currency customer dashboard database debug default delete delivery desktop developer device disable discount displayNav displayTop download dynamic editor effect empty encrypt engine error exchange exclude export facebook faceshop fade fancoupon fancybox fanpage fatal feature feed field file fix fixed font footer free friendly url front ftp full gallery generate gift global godaddy google google+ gray grid groupon header help hide highlight homefeatured homepage hook hosting hover howto htaccess html html5 ID image import include input instagram installation integration iPhone issue javascript jquery kgb knowhow languages law left likebox link list livingsocial loading log login logo loyality mail mailing maintenance manufacturer marketing marquee mcrypt menu meta mobile modification module movie moving multilanguage multiupload must have mysql news newsletter notification number open graph order override page password performance PHP phpmyadmin picture pinterest plugin popup post prestashop prestashop 1.0 prestashop 1.1 prestashop 1.2 prestashop 1.3 prestashop 1.4 prestashop 1.5 price rules problem product profile promotion proslider purifier quantity query quick tip random rates register reinsurance release reporting reset responsive restore results ribbon rich text right sales search security seo service shadow share shipping shop shopmania slider smarty social networks SQL SSL statistics stock store style subcategory superuser support switcher tab tablet tag tax template text theme tinyMCE tips and tricks tpl tracking translations tree trends trigger tumblr tutorial twitter update upgrade upload variables video visits voucher vulnerability web2print wide widget width window wishlist wysiwyg youtube zip zopim