Oro Documentation
Oro Documentation
  • USERS
  • DEVELOPERS
    • Backend Developer Guide
    • Frontend Developer Guide
    • Web Services API Guide
    • Community Guide
  • CLOUD
  • BLOG
  • FORUM
  • Home >
  • Developer Documentation >
  • Backend Developer Guide >
  • Bundles Documentation >
  • OroConsentBundle >
  • Add a Cookie Banner to the Website
  • Backend Developer Guide
    • Setup
      • System Requirements
        • Performance Optimization
        • MySQL Optimization
      • Development Environment
        • Environment Setup for Community Edition
        • Environment Setup for Enterprise Edition
        • Docker and Symfony Server
          • Setup on Mac OS X
          • Setup on Ubuntu 20.04
        • Web Server Configuration
        • Environment Type Based Application Configuration
        • Healthcheck and Data Monitoring
      • Demo Environment
        • VM VirtualBox
        • AWS Cloud Platform
        • Google Cloud Platform
        • Azure VM
        • Vagrant Provision
      • Get the Oro Application Source Code
      • Installation
      • Installation in Sub-Folder
      • Post-Installation: Content Restrictions
      • Loading Demo Data
      • Launch
      • Upgrade
      • Reinstall
      • Protect Cookies
    • Application Architecture
      • Technology Stack
        • Database
        • Search Index
        • Message Queue
      • Application Structure
      • Application Framework
        • Architecture Principles of Oro Applications
      • Application Customization
      • Differences to Common Symfony Applications
      • Custom Oro Application
    • Bundles and Extensions
      • Create a Bundle
      • Extend an Existing Bundle
      • Install Extension from the Oro Marketplace
      • Add an Extension to Oro Marketplace
    • Entities
      • Create Entities
      • Extend Entities
      • Configure Entities
      • CRUD Operations
      • Datagrids
        • Pass Request Parameters to the Grid
      • Customize Datagrids
        • Backend Datagrid
          • Scopes
          • Datasources
            • Array Datasource
            • ORM Datasource
          • Parameter Binding
          • Extensions
            • Action Extension
            • Board Extension
            • Export Extension
            • Field ACL Extension
            • Formatter Extension
            • Grid Views Extension
            • Inline Editing
            • Mass Action Extension
            • Mode Extension
            • Pager Extension
            • Sorter Extension
            • Toolbar Extension
            • Totals Extension
          • Events
          • Advanced Grid Configuration
          • Editable Datagrid Cells
          • Selected Fields Providers
          • State Providers
          • References in YAML Configuration
        • Frontend Datagrid
          • Mass Action Configuration
      • Protect Entities Using ACLs
      • Entity Aliases
      • Entity Activities
      • Entity Attachments
      • Customize CRUD Pages
      • Filters
        • Grid Extension
        • Filter Form Types
        • Javascript Widgets
    • Entities Data Management
      • Fixtures and Demo Data
      • Reports & Segments
      • Search Index
        • Configuration
        • Console Commands
        • Query Builder
        • Best Practices
        • Elasticsearch Configuration and Tuning
        • Troubleshooting
      • Workflows
        • Introduction
        • Configuration Reference
        • Elements
        • Basic Configuration
        • Transition Forms
        • Translation Wizard
        • Configuration Example
      • Operations (Actions)
        • Glossary
        • Buttons
        • Action Groups
        • Configuration Reference
        • Actions and Conditions
        • Console Commands
      • Processes
      • Data Audit
    • Security
      • Introduction to Security in Oro Applications
      • ACL Manager
      • Custom Permissions
      • Field ACL
      • Configurable Permissions
      • CSRF Protection
      • Access Rules
      • Custom listeners
      • Access Levels and Ownership (Example)
    • Translation and Localization
      • Translation
      • Localization
    • Integrations
      • Configuration
        • Basic Implementation
        • Configuration Reference
        • Additional Serializable Fields
        • Reverse Synchronization
        • Default Owner for Integration Related Entities
        • Additional Capabilities
      • Import and Export
        • Overview
        • Domain Model
        • Gaufrette
        • Fields Configuration
        • Import and Export Entities
        • Events
        • Extend Entities to Support Bulk Import and Export
        • Accelerate Import
        • Postponing Rows
    • Dashboards
    • Navigation
    • Emails
    • Message Queue
      • Message Queue Jobs
      • Consumer
        • Resetting Container
      • Security Context
      • Logging, Error Handling and Debugging
        • Writing Logs to ELK Stack
      • Testing
      • RabbitMQ (Enterprise Edition Only)
        • Command Lines
        • RabbitMQ Exchanges
        • Divide Queue to Separate Queues
        • Configure RabbitMQ for Production
        • Re-deliver Message with Limited Attempts
        • Backup and Restore
        • Troubleshooting
      • Supervisord
    • Cron
    • WebSocket Notifications
      • Websocket Recipes
        • Use Maintenance Mode Notifications in Oro Applications
        • Use Content Outdated Notifications in Oro Applications
        • Create a Topic and a Handler for Publishing and Subscribing
        • Publish Messages to Existing Topics
        • Use Authentication and Authorization in WebSocket Connections
      • WebSocket Connection Configuration
    • Scopes
    • Feature Toggle
    • Logging
    • System Configuration
    • Configuration Reference
      • Annotations
        • @Acl
        • @AclAncestor
        • @Config
        • @ConfigField
        • @TitleTemplate
      • YAML
        • Access Control Lists
        • Assets
        • Dashboards
        • Datagrids
        • Entity Configuration
        • Navigation
        • Placeholders
        • JS Modules
        • Search Index
        • System Configuration
        • Workflows
    • Extending OroCRM
      • Add OroCommerce Capabilities to an OroCRM Application
    • Extending OroCommerce
      • Create Payment Method Integrations
        • CyberSource Integration
      • Create Shipping Method Integrations
    • Akeneo Integration
    • Automated Tests
      • Functional Tests
      • Behat Tests
    • API Developer Guide
      • CLI Commands
      • Configure Stateless Security Firewalls
      • Configure Feature Depended Firewall Listeners
      • General Configuration
      • Configuration Reference
      • Configuration Extras
      • Configuration Extensions
      • Forms and Validators Configuration
      • Documenting API Resources
      • Actions
      • Request Type
      • Processors
      • Headers
      • Filters
      • How to
      • CORS Configuration
      • Testing REST API
      • Storefront REST API
      • Storefront Routes
      • Batch API
    • Bundles Documentation
      • ActionBundle
      • ActivityBundle
      • ActivityListBundle
      • AddressBundle
      • ApiBundle
      • AssetBundle
      • AttachmentBundle
        • OroAttachmentBundle Configuration
      • BatchBundle
      • CacheBundle
      • CalendarBundle
      • ChartBundle
      • CommentBundle
      • ConfigBundle
      • CronBundle
      • CurrencyBundle
      • DashboardBundle
      • DataAuditBundle
      • DataGridBundle
        • Default Editors
      • DistributionBundle
      • DigitalAssetBundle
      • ElasticSearchBundle
        • Index Agent and Search Engine
        • ElasticSearch Indexes Backup
        • ElasticSearch Configuration
        • Request Builders
        • Troubleshooting
        • Upgrade Standard Index to Elasticsearch 7.*
      • EmailBundle
      • EmbeddedFormBundle
      • EntityBundle
      • EntityConfigBundle
      • EntityExtendBundle
      • EntityMergeBundle
      • EntityPaginationBundle
      • EntitySerializedFieldsBundle
      • FeatureToggleBundle
      • FilterBundle
      • FormBundle
      • GaufretteBundle
      • GridFSConfigBundle
      • ImapBundle
      • ImportExportBundle
      • InstallerBundle
      • IntegrationBundle
      • LayoutBundle
        • Layout Cache
      • LocaleBundle
      • LoggerBundle
      • MessageQueueBundle
      • MigrationBundle
      • NavigationBundle
      • NoteBundle
      • NotificationBundle
      • OAuth2ServerBundle
      • OrganizationBundle
      • PlatformBundle
      • QueryDesignerBundle
      • RedisConfigBundle
      • ReportBundle
      • ScopeBundle
      • SearchBundle
        • ORM Search Engine
        • Search Relevance Weight
        • DateTimeFormatter
      • SecurityBundle
      • SegmentBundle
      • SidebarBundle
      • SyncBundle
      • TagBundle
      • TestFrameworkBundle
        • Additional Doctrine Events
      • ThemeBundle
      • TranslationBundle
      • TwigInspectorBundle
      • UIBundle
        • Action Manager
        • Client Side Navigation
        • Content Providers
        • Dynamic Assets
        • Formatters
        • Scroll Data Customization
        • TWIG Placeholders
        • TWIG Filters
        • Widgets
        • ApiAccessor
        • BaseClass
        • HiddenInitializationView ⇐ BaseView
        • Layout Subtree View
        • LoadMoreCollection
        • Loading Mask View
        • MultiUseResourceManager ⇐ BaseClass
        • PersistentStorage
        • Highlight Text View
        • RouteModel
        • RoutingCollection
        • SearchApiAccessor
        • Viewport Manager
        • Error Handler
        • Input Widgets
        • Items Manager
        • Mediator Handlers
      • WindowsBundle
      • WorkflowBundle
      • DraftBundle
        • How to Use Drafts
        • How to Use Draft ACL
        • How to Use the Draft Filter
        • How to Resolve Draft Conflicts
        • How to Use a Draft Extension
      • CatalogBundle
      • CheckoutBundle
      • CMSBundle
        • Content Widgets
        • WYSIWYG Field
          • How to Add WYSIWYG Field
          • How to Change TextArea Field to WYSIWYG Field
          • WYSIWYG Field Validation
        • Content Blocks
        • Create Editor Components
      • ConsentBundle
        • Add a Cookie Banner to the Website
        • Add the Customer Consents Field to a Form (Example)
        • Add the Agreements Step to a Custom Checkout Based on the Default Checkout Workflow (Example)
        • Add the Agreements Section to a Custom Checkout Based on the Single Page Checkout Workflow (Example)
      • CustomerBundle
      • FrontendBundle
        • Frontend Sessions and Debug Routes
        • Frontend Access
        • Set Up Mass Action in Datagrid
        • Sticky Panel View
        • Dom Relocation Global View
      • InventoryBundle
      • OrderBundle
        • Previously Purchased Products
      • PricingBundle
        • Configure Price List Sharding
        • Optimize Website Indexation and Price Recalculation
        • Combined Price List
        • Price Storage
        • Pricing Strategy
      • ProductBundle
        • Product Actions
        • Customize Products Using Layouts
          • Customize Product View Page
          • Customize Product List Page
          • Customize Products SKU Validation
        • Product Attributes
        • Product Unit Formatting
        • Product Variant Search
        • Related Items
      • SEOBundle
        • Sitemap
        • SEO Meta Fields
      • TaxBundle
      • WebCatalogBundle
      • WebsiteElasticSearchBundle
        • Website ElasticSearch Search Engine
        • Website ElasticSearch Configuration
        • Request Builders
        • Upgrade Website Index to Elasticsearch 7.*
      • WebsiteSearchBundle
        • Website Search VS Regular Search
        • Website Search Configuration
        • Search Index Structure
        • Console Commands
        • Perform Search
        • Indexation Process
        • Reindexation During Platform Update
        • ORM Search Engine
        • Search Relevance Weight
        • Testing
Version:
4.1 (latest)
  • 4.2 Beta (master)
  • Contents
    • Add a Cookie Banner
    • Add a Translation

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:

  1. Download the OroCommerceCookieBannerBundle archived file.

  2. Unpack the downloaded file to {application_name}/src/Oro/Bundle.

  3. Run the following commands:

    For dev mode

    1
    2
    3
    4
    rm -rf var/cache/*
    php composer.phar install --prefer-dist --no-dev
    php bin/console oro:platform:update --env=prod --force
    php bin/console oro:message-queue:consume --env=dev
    

    For prod mode

    1
    2
    3
    4
    rm -rf var/cache/*
    php composer.phar install --prefer-dist --no-dev
    php bin/console oro:platform:update --env=prod --force
    php bin/console oro:message-queue:consume --env=prod
    
  4. Reload the application in the browser.

Add a Translation

To add a translation to the cookie banner to present information in the desired language:

  1. Run the following command:

    1
    php bin/console oro:translation:load --env=prod
    
  2. In the back-office, navigate to System > Localization > Translations.

  3. Using filters, locate following translation keys:

    • oro_cookie_banner.text
    • oro_cookie_banner.button_label
  4. Add translation for the banner text and label.

  5. Click Update Cache on the top right.

  6. Once cache is updated, the translated banner will be displayed in the storefront.

Related Topics

  • Data Protection in the OroCommerce Storefront
  • Configure Consents
  • Declined Consents as Contact Requests
  • Create Consents
  • View and Accept Consents in the Storefront
  • Revoke Consents
  • Build Reports with Accepted Consents
Oro Documentation
  • Oro inc
  • Orocommerce
  • Orocrm
  • Oroplatform
  • Partners
  • Services
  • Events
  • Terms & conditions
  • Privacy policy
  • Contributor license agreement

@2019 Oro, Inc. All Rights Reserved.

Back to top