PrestaShop module
A PrestaShop module that adds the ConsentTrustee consent banner to your store. Configure everything from the back office.
Installation
1. Upload the module
In your PrestaShop back office, go to Modules > Module Manager. Click Upload a module and select the ConsentTrustee ZIP file. PrestaShop will install it automatically.
Alternatively, upload the consenttrustee folder to /modules/ via FTP and install through the Module Manager.
2. Configure
Click Configure on the ConsentTrustee module. Enter your domain slug from the ConsentTrustee dashboard and save.
Optional settings:
- API URL — only needed if you self-host ConsentTrustee
- Language — leave blank to detect from the current PrestaShop language
- Google Consent Mode — enable and choose Basic or Advanced
3. Clear cache
Go to Advanced Parameters > Performance and click Clear cache. Then check your store in an incognito window.
How it works
The module hooks into PrestaShop's displayHeader hook, which runs on every storefront page. It renders a Smarty template that outputs the ConsentTrustee script tag with the correct data attributes.
The script loads from the ConsentTrustee CDN, so it does not add any files to your PrestaShop installation. Configuration is stored using PrestaShop's Configuration API and is removed cleanly when you uninstall the module.
Script blocking
For third-party scripts in your PrestaShop theme or modules, block them by changing the script tag:
{* Before *}
<script src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>
{* After (blocked until consent) *}
<script type="text/plain" data-ct-category="statistics"
data-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>Available categories: statistics, marketing, preferences.
Multi-language stores
If you leave the language field empty (the default), ConsentTrustee will auto-detect the language from the page's html lang attribute. PrestaShop sets this automatically based on the active language, so the consent banner will match whatever language the visitor is browsing in.
Requirements
- -PrestaShop 8.0 or later
- -PHP 8.0 or later
- -A ConsentTrustee account with a configured domain