commercekings / module-consent-vanilla
vanilla-cookieconsent (orestbida/cookieconsent v3) as a consent source for commercekings/module-consent.
Package info
github.com/commercekings/module-consent-vanilla
Language:JavaScript
Type:magento2-module
pkg:composer/commercekings/module-consent-vanilla
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
- commercekings/module-consent: ^0.1
- commercekings/module-consent-defaults: ^0.1
- magento/framework: ^103.0.4
- magento/module-config: ^101.2
Requires (Dev)
None
Suggests
None
Provides
- commercekings/consent-source: 0.1.0
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-19 17:35:30 UTC
README
Works with Magento 2.4.4+ · Luma and Hyvä · PHP 8.1–8.5
A fast, clean cookie banner that records real, provable consent.
- Luma and Hyvä, detected automatically – nothing to configure per theme.
- Only what you use. Categories appear only when a feature needs them.
- Ready for your policy. Privacy policy link and a "Cookie settings" link built in.
- Yours to style. Translatable texts and CSS variables for your theme.
Built on the bundled vanilla-cookieconsent 3.1.0; it is the consent source for Consent.
Installation
composer require commercekings/module-consent-vanilla:^0.1 bin/magento setup:upgrade
It brings Consent and the default categories, and provides commercekings/consent-source – the banner the
notification bridge and Google tags require.
Settings
- Select Cookie banner (vanilla-cookieconsent) in Stores > Configuration > CommerceKings > Consent > Source.
- Set the Privacy policy page there – the banner links it.
- Flush the full page cache.
Besides the footer link, any element with class ck-cookie-settings reopens the preferences.
Customization
- Texts: English in code, translated with Magento's
i18n/<locale>.csv. - Categories: the defaults, or your own complete
categoriesonCommerceKings\ConsentVanilla\Model\Sourcein your site module'sdi.xml– then raise Source revision. List each purpose in one category; listed in several, it stays in the first. - Styling: the library's CSS variables (
#cc-main { --cc-... }) in your theme.
The banner starts no analytics and loads no external content itself; feature modules do that once consent is given.
Tested (as of 0.1.0)
- Automated tests: 33 unit and 37 JavaScript tests (Luma and Hyvä) (unit and JavaScript tests run on every push); 98.8% line coverage by the unit tests.
- End to end on Magento 2.4.9: in Chrome, the banner's choices on a Luma store are recorded as consents.
- Install: a fresh install of every CommerceKings package from GitHub on an empty Magento database, verified.
- Not tested: the Hyvä banner end to end in a browser (it is covered by the JavaScript tests).
More
How it works – the library and its upgrades, the source, the banner, a site di.xml example ·
Compatibility · Changes
Disclaimer
These modules help you ask for, record and respect your shoppers' choices – they don't make your store compliant on their own. You are responsible for your store's privacy: what you collect, the wording you show, your privacy policy and whether your setup meets the laws that apply to you (e.g. GDPR, ePrivacy, email marketing rules). Get legal advice if you are unsure.
Need it installed, set up or customized? Get in touch →