How to add FREE popup cookie consent in PrestaShop

A consent banner is a cookie notice that appears on websites upon the user’s first visit to the site. Cookie consent banners first started to show up on virtually every website in the EU in response to the ePrivacy Directive of 2002, popularly called “The cookie law”.

According to the Directive, all websites had to give a cookie alert to their users about the fact that they set cookies on the user’s browser. The purpose of cookie consent banners therefore was to alert the users of the website about the cookies and get consent for setting them.

However, the EU legislation regarding cookies and personal data has changed. The cookie notifications are still required, but the requirements have become a lot stricter. To meet this requirements on your PrestaShop store, normally you need a paid module to do the job. There are free modules out there. However they often lack of options to properly configure, or make unnecessary connections to third party websites of the developers.

Installing PrestaShop cookie consent for your store

Here i will show you how to do it properly and for FREE. Go to and click on the download button.

Cookie Consent setup

Configure your cookie consent like position, compliance type, colors etc. Once you finish with configuration, copy the code on the right. Now open your FTP and go to your store, alternatively you can use your cPanel file manager. Navigate to your PrestaShop store folder – themes/classic (or the theme you are using).

Once there, go to templates/_partials folder, download and backup the “head.tpl” file. Open the “head.tpl” with notepad or notepad++ or any other code editor, but don’t use Word or software like this. Once you open the file, scroll to the very bottom of the file, and just after the “{block name=’hook_extra’}{/block}” paste the code you copied earlier.

Head TPL file Edit

Save the file and re-upload it to your PrestaShop store folder /themes/classic/templates/_partials.

Note: In order to see the changes in your front office, go to your Back Office -> Advanced Parameters -> Performance. Make sure to set “Recompile templates if the files have been updated” option, and then clear the cache.

PrestaShop Clear Cache
Cookie Consent popup ready

That’s it you are done. You now have Cookie Consent popup for free!


    • Did you cleared your PrestaShop cache as explained in the article in the – Back Office -> Advanced Parameters -> Performance and set to “force compile”? Also clear your browser cache and test it under incognito mode. If still don’t work, you have edited the wrong file, and you should check again.

    • It should be in the header.tpl in your theme folder, inside <.head> <./head> tags, if i remember correctly.


Please enter your comment!
Please enter your name here

Must Read

PrestaShop vs WooCommerce: Practical comparison

Many of my acquaintances and friends ask me if they should use WooCommerce instead of PrestaShop for their store.