♥JcMagpie Posted March 17, 2019 Share Posted March 17, 2019 Tart GDPR-cookie-widgets V1.0 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'); </script> That’s all that is required. If you need more scripts then go to this website and search for the one you need. https://opt-out.ferank.eu/en/install/ 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. Enjoy. Auto detect shop language. Link to comment Share on other sites More sharing options...
freakystreak Posted July 9, 2019 Share Posted July 9, 2019 does the ext folder go inside the includes folder? I'm not seeing any modal appearing on the home page. Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
freakystreak Posted July 9, 2019 Share Posted July 9, 2019 Found this error appearing: Quote 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 More sharing options...
♥Dnj1964 Posted July 9, 2019 Share Posted July 9, 2019 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 More sharing options...
♥Dnj1964 Posted July 9, 2019 Share Posted July 9, 2019 Link to comment Share on other sites More sharing options...
freakystreak Posted July 9, 2019 Share Posted July 9, 2019 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 More sharing options...
freakystreak Posted July 9, 2019 Share Posted July 9, 2019 Sorry, ignore my stupidity. I didn't realise you had to have a script active to make it work. Many apologies. Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted July 9, 2019 Author Share Posted July 9, 2019 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.