Magento 2 Cookie Notice

Table of Content

  1. Extension Installation Guide
  2. Configuration
  3. Content Settings
  4. Container Display Settings
  5. Cookie Notice in Frontend

 

  1. Extension Installation
  • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
  • Login to your SSH and run below commands step by step:
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy -f
    • php bin/magento cache:flush
  • That’s it.

 

  1. Configuration
    To configure the extension, log in to Magento 2 backend, move to Stores > Configuration > Cookie Notice where you can find various settings to configure the extension.
  • Cookie Notice: Enable the extension from here.
  • Notice Display Type: Choose one of the notice display types either from bar or popup.
  • Bar Position: Set bar or pop up position.
  • When User Closes the Notice: Select the event to perform when the user closes the notice.
  • Accept cookies automatically after X seconds: Enter the number of seconds after which the cookies are accepted automatically.
  • Autohide Cookie Notice After: Enter the number of seconds after which the cookie notice is automatically hidden.
  • Expire Cookie Agreement after: Enter the number of days after which the cookie agreement expires.


 

  1. Content Settings
    Configure the following settings to modify the content of the cookie notice.
  • Notice Type: Select the notice message type from the dropdown menu.
  • Notice Text: Configure the custom notice message to be displayed for Cookie Notice.
  • Container Title: Add the container title.
  • Accept Button Text: Set the text for Accept Cookies button.
  • Deny Button Text: Set the text for Deny Cookies button.
  • Privacy Policy Button Text: Set the text to be displayed for privacy policy button.
  • Privacy Policy Redirect Information Page: Select the redirect page for privacy policy button.
  • Accept Cookie On Scroll: Enable the option to automatically make the user accept the cookies on scroll action.


  

 

  1. Container Display Settings
    Configure the container display settings to enhance the display of the cookie notice bar or popup in the frontend. Settings here contain font type, text-align, size and color of the container background, font and buttons etc.
     
    • Font Family: Select the font family.
    • Container Text Align: Set alignment for container text.
    • Container Title Text Size: Set the size of the container title text.
    • Container Message Text Size: Set the size of the container message text.
    • Container Border: Enable the container border.
    • Container Message Font Color: Select the color for container font.
    • Accept Button Background Color: Select the color for accept button background.
    • Close Button Background Color: Select the color for close button background.
    • Privacy Policy Button Background Color: Select the color for the privacy policy button background.
    • Close Button Text Color: Select the color for the close button text.
    • Privacy Policy Text Color: Select the color for the privacy policy text.
    • Accept Button Text Color: Select the color for the accept button text.
    • Container Title Color: Select the color for container title.




 

  1. Cookie Notice in Frontend
    Once the settings are configured, the cookie notice is displayed as set either in the bar or in the popup in the frontend.
  • Cookie Notice Bar in frontend


 

  • Cookie Notice Pop Up in frontend