1. What this module does

The module asks visitors their age before they see your products: "Are you 18 or older?" with a Yes and a No button. It is meant for shops selling alcohol, tobacco, CBD or adult products. You choose the minimum age, write the texts in every language and decide whether the whole shop asks or only chosen categories and their products. A "yes" is remembered for the number of days you set; after a "no" the visitor is sent to an address of your choice or sees a refusal message.

Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.

2. Installation

  1. Download the module from My account → Order history at addonspresta.com.
  2. In your Back Office, open Modules → Module Manager and click Upload a module.
  3. Drop the ap_ageverification_v1.0.1.zip file and wait for the confirmation.
  4. Click Configure on the module card.

Right after installation the whole shop asks for an age of 18, with ready texts in English, Polish and French.

3. How it works

On every page that should ask, the module adds a hidden dialog at the bottom of the page. A small script shows it unless this browser has already answered "yes" for this shop. While the dialog is open, the page behind it cannot be scrolled, clicked or reached with the keyboard.

  • Yes closes the dialog and remembers the answer in the visitor's browser (local storage, no cookie) for the number of days you set. Only the minimum age and an expiry date are stored; nothing is sent to your server or to anyone else.
  • No sends the visitor to your redirect address, or, if you left it empty, shows your refusal message with an Answer again button. A "no" is not remembered: the next page asks again.

This is a declaration by the customer, not an identity check. The module does not verify documents or dates of birth. If your country's law requires real age verification (for example at delivery or with an identity service), you still need it. The dialog also needs JavaScript: a visitor who has JavaScript turned off does not see it.

Pages that never ask. CMS pages (terms and conditions, privacy policy, legal notice, delivery information and any other page under Design → Pages) never show the dialog, so everyone can read your legal information. You can also use such a page as the redirect address.

Raising the minimum age. A "yes" remembers the age it was given for. If you raise the minimum age, for example from 18 to 21, every visitor is asked again. Lowering it keeps the earlier answers.

The module only adds the dialog; it does not change your prices, orders or PrestaShop tables, and it does not connect to addonspresta.com or any other server. The texts of your pages stay in the page code, so search engines can still read them.

4. Features and settings

Open Modules → Module Manager → Age Verification Popup → Configure. The Help box at the top links to this manual and to the module page at addonspresta.com, in the language of your Back Office.

Minimum age

A whole number from 13 to 25 (18 by default). In every text, {age} is replaced with this number.

Remember the answer for

How many days a "yes" is kept in the visitor's browser, from 0 to 365 (30 by default). With 0 the answer is kept only until the visitor closes the browser tab; a new tab asks again. A visitor who clears the browser data or uses another browser or device is also asked again. If you shorten the period, earlier answers follow the new one: after changing 30 days to 1, a visitor who answered last week is asked again.

Where to ask

  • The whole shop — every page except CMS pages: home page, categories, products, search, cart, checkout and the customer account.
  • Only the categories below and their products — the pages of the ticked categories, and the page of every product assigned to at least one of them (not only through its main category). Other pages do not ask.

Categories

The category tree used with Only the categories below and their products. Subcategories are not included automatically: tick them too if they should ask. Save at least one category with this option.

Redirect after "no"

A full address starting with http:// or https://, for example a CMS page of your shop explaining the age rule, or another website. Leave it empty to show the refusal message in the dialog instead. Do not redirect to a page that asks for the age itself (with The whole shop, your home page asks too), or the visitor will see the question again.

Show the shop logo

Shows your shop logo, as set in your theme settings, above the title.

Title, Question, "Yes" button, "No" button, Refusal message

The texts of the dialog for each language, plain text without HTML; line breaks in the question and the refusal message are kept. {age} is replaced with the minimum age. The texts in the default language are required (the refusal message only when there is no redirect address); other languages fall back to them when left empty.

The dialog uses the fonts and buttons of your theme (main and secondary button) on a dark overlay.

5. Multistore

Settings are saved for the shop or shop group selected in the Back Office header. Select All shops to set the same values everywhere, or a single shop to give it its own age, categories and texts. Each shop remembers its own answers, so a "yes" given in one shop does not open another. In the All shops or group context only an employee who manages every shop of it can save. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Age Verification Popup → Uninstall removes the module's settings and texts. To keep them, use Disable instead. Answers already stored in visitors' browsers stay there but are no longer used.

7. FAQ and troubleshooting

The dialog does not appear. You may have answered "yes" earlier: open the shop in a private window. Check that the page should ask (CMS pages never do; with Only the categories below, check the ticked categories) and that JavaScript is on. Then clear the cache in Advanced Parameters → Performance.

The dialog appears on every page even after "yes". The browser does not keep local storage, for example in some private modes or when site data is blocked. Visitors with normal settings are asked once per period.

Can I check the date of birth or an identity document? No. The module records the customer's own declaration. Use a dedicated identity or delivery service when the law requires real verification.

A text is still in English in my Polish or French shop. Fill in the texts for that language in the module configuration.

Saving shows "The form has expired". The configuration page was opened more than a day ago, or your Back Office password changed in the meantime. Reload the page, enter the changes again and save. This protects the settings against forged requests.

Can I change how the dialog looks? Yes. Copy views/templates/hook/dialog.tpl to themes/<your-theme>/modules/ap_ageverification/views/templates/hook/ and edit the copy, or add CSS for the .ap-ageverification classes to your theme.

8. Updates and support

Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings are kept.

Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.

Back to User manuals

Loading...
Back to top