The module shows a cookie consent banner, blocks scripts until consent is given and keeps a list of cookies grouped into categories. This page explains how to configure it and what to expect from it.
What the module does
The module keeps its own cookie list in ps_megacookie and ps_megacookie_lang. Each entry has a name, a variable name, a category (functional, statistics, marketing, other), a description and a visibility switch. On the front office it hooks into header and displayFooter: the header loads the assets and the stored decision, the footer renders the banner. The visitor's choice returns to the shop through the module's own AJAX controller.
Requirements
- PrestaShop 1.6, 1.7, 8 or 9.
- No ionCube, no extra PHP extensions.
- A theme that renders the
displayFooterhook — that is, any standard one.
Installation
- Back office → Modules → Module Manager → Upload a module.
- The installer creates both tables and registers two hooks.
- Open the configuration and fill in the cookie list — the module does not guess which scripts your shop runs.
Configuration
Cookie list
The Cookies list tab lets you add an entry by hand: name, variable, category, description. The category decides which switch in the banner the cookie belongs to. Descriptions are translated — ps_megacookie_lang holds one row per language.
Settings
| Option | Key | What it does |
|---|---|---|
| Cookie crawler | megacookie_crawler |
Reads the cookies your site sets and adds them to the list, so you do not have to type them in. |
| Minimiser | megacookie_minimizer |
Leaves a small handle after the banner is closed so visitors can reopen their consent settings. |
| Geolocation | megacookie_geo |
Shows the banner only to visitors from European Union countries. |
| Consent banner | megacookie_window |
Turns the banner itself on and off. |
| Colours | megacookies_color1 … color4 |
Four banner colours: background, text, button and accent. |
| Heading, text, links | megacookies_title_, megacookies_desc_, megacookies_link_, megacookies_link1_ |
Banner content and two links, usually the privacy policy and the cookie policy, set per language. |
Using it with Google Consent Mode v2
Consent Mode v2 works through signals passed to Google scripts before they run. Configure your analytics scripts to start only after the visitor decides: the statistics and marketing categories map directly onto the analytics_storage and ad_storage signals. Scripts pasted straight into a theme template will run regardless of consent — that is the most common reason a compliance audit fails despite a working banner.
Troubleshooting
The banner never appears
Check whether geolocation is enabled while the shop has no geolocation data — the module then cannot tell whether the visitor is in the EU and shows nothing. Also check that the theme renders displayFooter.
The banner appears on every visit
The decision is stored in a cookie. If the shop sits behind a cache that strips cookies from responses, the decision has nowhere to be saved. Exclude the home page and product pages from caching responses that carry Set-Cookie.
Scripts load despite no consent
The module only controls what goes through it. Codes pasted directly into a theme template or added by another module start independently — they have to be moved under consent control.