Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Support thread for JcM Tart GDPR-cookie-widgets V1.0

Recommended Posts

I have to thank @Gyakutsuki for all his help with this add-on and especially the multilingual code.

let’s you add a cookie widget to your site. This will allow your customer to refuse cookies if they wish to and let you comply with legislation.

What you allow will depend on who you are and what legal requirements you need to comply with. It is imposable to make an add-on that will work out of the box for all shops.

So this has 2 modules, one is a header_tag which installs the main script which loads the main js and makes language selection. The other is a footer_suffix which allows you to enter the custom scripts for your cookies.

You have 10 input boxes in footer_suffix admin to enter custom scripts. You do not need to use all 10, these are just to make management easy for most shops who will need only a few so can enter one into each box.

If you need more than ten then just add extras all into one box.

Included in the files is a list of some of the main scripts needed.

Simply copy from <script to </script> and paste into input box and save.

<script type="text/javascript">

(tarteaucitron.job = tarteaucitron.job || []).push('adsense');



That’s all that is required. If you need more scripts then go to this website and search for the one you need.


The script is multilingual but I have only added a few to the code. These are in the header_tag class so if you need more you can edit it and add them.


$language_code == 'fr' ||

$language_code == 'en' ||

$language_code == 'nl' ||

$language_code == 'de' ||

$language_code == 'es' ||

$language_code == 'it' ||

$language_code == 'pt' ||

$language_code == 'pl' ||

$language_code == 'ru' ) {


That’s it again as always copy everything over into correct directory's don't forget to copy the new js files to ext.

Then go into admin and install and set up the 2 modules. You have to have both installed and set up. The rest is straightforward and should be self explanatory.








Auto detect shop language.





Link to comment
Share on other sites

  • 3 months later...

Found this error appearing:


PHP Warning:  Use of undefined constant footer_scripts - assumed 'footer_scripts'

on this line:

$oscTemplate->addBlock( '<script type="text/javascript"> var tarteaucitronForceLanguage =  ' . "'" . $language . "'"  . ' ;</script>' . "\n", footer_scripts);

Is this a php 7 issue?

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

22 minutes ago, freakystreak said:

does the ext folder go inside the includes folder? I'm not seeing any modal appearing on the home page.

In public_html you will find the ext folder.

Should be 2nd or 3rd folder listed

Link to comment
Share on other sites

17 minutes ago, Dnj1964 said:

In public_html you will find the ext folder.

Should be 2nd or 3rd folder listed

That's what I thought but are't the modules within the ext folder usually contained in their own folder? I have put it inside it's own folder named 'tarteaucitron' as that's where the script is pointing to but I'm still getting the above error

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

The "error" is just a "warning" yes related to version of PHP beeing used. You can get rid of the warning by editing that file like this.

$oscTemplate->addBlock( '<script type="text/javascript"> var tarteaucitronForceLanguage =  ' . "'" . $language . "'"  . ' ;</script>' . "\n", 'footer_scripts');

All you are doing is replacing footer_scripts with  'footer_scripts'


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...