Important
You are browsing the documentation for version 1.6 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
Add a Cookie Banner to the Website
Cookies can be used to uniquely identify a person, which means that they represent personal data. In compliance with the General Data Protection Regulations (GDPR), it is required to let website visitors and customers know what types of cookies will be used, and allow them to choose which ones they want to agree to. Implied consents and consents given simply by visiting a website are not enough.
To comply with the GDPR policy, OroCommerce enables you to set up a Cookie Banner with your custom text to be displayed in the storefront of the OroCommerce website, and translate it into your preferred language.
Add a Cookie Banner
To set up a cookie banner:
Download the OroCommerceCookieBannerBundle archived file.
Unpack the downloaded file to {application_name}/src/Oro/Bundle.
Run the following commands:
For dev mode
1 2 3 4
rm -rf app/cache/* php composer.phar install --prefer-dist --no-dev php app/console oro:platform:update --env=prod --force php app/console oro:message-queue:consume --env=dev
For prod mode
1 2 3 4
rm -rf app/cache/* php composer.phar install --prefer-dist --no-dev php app/console oro:platform:update --env=prod --force php app/console oro:message-queue:consume --env=prod
Reload the application in the browser.
Add a Translation
To add a translation to the cookie banner to present information in the desired language:
Run the following command:
1
php app/console oro:translation:load --env=prod
In the back-office, navigate to System > Localization > Translations.
Using filters, locate following translation keys:
- oro_cookie_banner.text
- oro_cookie_banner.button_label
Add translation for the banner text and label.
Click Update Cache on the top right.
Once cache is updated, the translated banner will be displayed in the storefront.
Related Topics