Zen Cart Logo
Forums / All Other Contributions/Addons / Cookie Control [Support Thread]

Cookie Control [Support Thread]

Views: 54,574

Results 121 to 140 of 174
31 May 2015, 7:05 PM
#121
moosesoom avatar

moosesoom

New Zenner

Join Date:
Dec 2008
Location:
Rimini, Italy, Italy
Posts:
67
Plugin Contributions:
0

Cookie Control [Support Thread]

my template jscript dir:

BAKjquery.form.min.jsBAK
jscript_google_analytics.php
jscript_supertracker.php
BAKjscript_script_loader.phpBAK
jquery-1.4.4.min.js
jscript_cookieControl-5.1.min.php
jscript_imagehover.js
on_load

jquery 1.4.4 is correctly loaded for image management with lightbox popups

I tried to substitute jquery 1.4.4 wint 1.7 from google apis, but I have same result: lightbox is ok, cookie law popup doed not show at all (as long ad it's present in page source)

:(

31 May 2015, 7:14 PM
#122
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

Yes you are loading jquery for lightbox, but that si not site wide.

find in includes/ templates/YOUR_TEMPLATE/common/html_header.php

/**
 * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
  }

<?php
/**
 * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
 */

and change it to```php
/**

  • load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
    while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
    }

/** CDN for jQuery core **/
?>

<script>window.jQuery || document.write('<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>');</script> <script>window.jQuery || document.write('<script src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"><\/script>');</script> <?php /** * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically */ ``` this will ensure to load jquery when it is not loaded by another script
31 May 2015, 7:55 PM
#123
moosesoom avatar

moosesoom

New Zenner

Join Date:
Dec 2008
Location:
Rimini, Italy, Italy
Posts:
67
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Done....but results are the same...maybe some other jscript is conflicting with cookie law one?

4 Jun 2015, 5:29 AM
#124
moosesoom avatar

moosesoom

New Zenner

Join Date:
Dec 2008
Location:
Rimini, Italy, Italy
Posts:
67
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

SOLVED!!!!
In italian language files I had to substitute a' with à and so on... (I hate accented vowels) :)

Hope it could help everyone with this problem.

4 Jun 2015, 6:53 AM
#125
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

moosesoom:

SOLVED!!!!
In italian language files I had to substitute a' with à and so on... (I hate accented vowels) :)

Hope it could help everyone with this problem.

Wow, good catch. I never would have guessed that!

9 Oct 2015, 9:24 AM
#126
alboley99 avatar

alboley99

New Zenner

Join Date:
Sep 2015
Posts:
1
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Hi,

I'm using ZenCart 1.5.4 and have just installed Cookie Control.

When the Cookie Control displays it shows two triangles (or a triangle and a diamond if configured to show a diamond). I've checked all of the install files etc. Any ideas what is going wrong?

Attachment 15678

9 Oct 2015, 9:43 AM
#127
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

Do you have a link to your site?

1 Jul 2016, 2:49 PM
#128
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

A client is using this plugin but a resource is returning a 403. Specifically, https://ssl.geoplugin.net/javascript.gp in tpl_cookie_control.php

I've contacted Geo Plugin (waiting for a reply). Is there another way to accomplish this until they fix the issue on their end?

18 May 2018, 8:58 PM
#129
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Cookie Control [Support Thread]

jeking:

A client is using this plugin but a resource is returning a 403. Specifically, https://ssl.geoplugin.net/javascript.gp in tpl_cookie_control.php

I've contacted Geo Plugin (waiting for a reply). Is there another way to accomplish this until they fix the issue on their end?
Likewise, looking at the cookie-control javascript I don't see where that geoplugin script's output is even used.

18 May 2018, 9:35 PM
#130
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

It has been a long time since i had a look at this code, but I think it is used with "geoplugin_countryName". And I think i remember seeing a mention somewhere that that is a paid service nowadays

lat9:

Likewise, looking at the cookie-control javascript I don't see where that geoplugin script's output is even used.

19 May 2018, 8:25 AM
#131
eentje avatar

eentje

Zen Follower

Join Date:
Jan 2009
Location:
The Netherlands/Germany
Posts:
144
Plugin Contributions:
4

Re: Cookie Control [Support Thread]

Geoplugin is a paid service nowadays... you can disable the line(s) of code, module still works then.
As i remember correctly it just looks up from where the costumer comes so that the right language is chosen.

19 May 2018, 12:54 PM
#132
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Cookie Control [Support Thread]

Design75:

It has been a long time since i had a look at this code, but I think it is used with "geoplugin_countryName". And I think i remember seeing a mention somewhere that that is a paid service nowadays

eentje:

Geoplugin is a paid service nowadays... you can disable the line(s) of code, module still works then.
As i remember correctly it just looks up from where the costumer comes so that the right language is chosen.
Thank you both, commenting out that block is what I did.

24 May 2018, 9:05 AM
#133
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Darn, what did I do wrong. :blush:

I installed on my xampp test PC and it worked fine.

Now I transferred it to my online test site here (some images not yet installed) but the icon and pop up do not show up. I can configure Cookie Control admin OK and according to the log it is blocking the Google Analytics cookies OK. No other logged errors.

Maybe it does not like being in a sub domain?

I looked at the page source (see below) and the code is there but I do not know if anything is wrong or missing :dontgetit

// cookieControl version 5.1 (2012-06-19, RA, leigh)
// Copyright (c) 2012 Civic UK (http://www.civicuk.com/cookie-law/)
function cookieControl(a){if(typeof(a)=="undefined"){a={pollPeriod:25,pollIncrement:1.25}}a.pollPeriod=a.pollPeriod||25;a.pollIncrement=a.pollIncrement||1.25;a.jQueryUrl=a.jQueryUrl||"https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js";if(typeof(jQuery)=="undefined"||parseInt(jQuery.fn.jquery.replace(/\./g,""))<144){document.write('<script type="text/javascript" src="'+a.jQueryUrl+'"><\/script>')}_cookieControlPoll(a)}function _cookieControlPoll(a){if(typeof(jQuery)=="undefined"){setTimeout(function(){_cookieControlPoll(a)},a.pollPeriod);a.pollPeriod*=a.pollIncrement}else{jQuery(function(){CookieControl.init(a)})}}var CookieControl={options:{countries:"United Kingdom",shape:"triangle",position:"left",theme:"light",introText:"~introduction_text",fullText:"~full_text",cookieOnText:"Cookies are on",cookieOffText:"Cookies are off",cookieName:"civicAllowCookies",protectedCookies:[],iconStatusCookieName:"civicShowCookieIcon",cookiePath:"/",clickFadeSpeed:1000,acceptDelay:400,startOpen:false,autoHide:60000,autoDelete:60000,domain:"",subdomains:true,html:'<div id="cccwr"><div id="ccc-state" class="ccc-pause"><div id="ccc-icon"><button><span>Cookie Control</span></button></div><div class="ccc-widget"><div class="ccc-outer"><div class="ccc-inner"><h2>Cookie Control</h2><div class="ccc-content"><p class="ccc-intro"></p><div class="ccc-expanded"></div><div id="ccc-cookies-switch" style="background-position-x: 0;"><a id="cctoggle" style="background-position-x: 0;"><span id="cctoggle-text">Cookies test</span></a></div><div id="ccc-implicit-warning">(One cookie will be set to store your preference)</div><div id="ccc-explicit-checkbox"><label><input id="cchide-popup" type="checkbox" name="ccc-hide-popup" value="Y" /> Do not ask me again <br /></label>(Ticking this sets a cookie to hide this popup if you then hit close. This will not store any personal information)</div><p class="ccc-about"><small><a href="http://www.civicuk.com/cookie-law" target="_blank" >about this tool</a></small></p><a class="ccc-icon" href="http://www.civicuk.com/cookie-law" target="_blank" title="About Cookie Control">About Cookie Control</a><button class="ccc-close">Close</button></div></div></div><button class="ccc-expand">read More</button></div></div></div>',onReady:null,onCookiesAllowed:null,onCookiesNotAllowed:null,onAccept:null,consentModel:"information_only"},init:function(a){this._jc=false;this.options=jQuery.extend(this.options,a);this.initWidget();this.readyEvent();if(this.maySendCookies()){this.cookiesAllowedEvent()}else{this.cookiesNotAllowedEvent()}},cookieLawApplies:function(){if(this.countryHasCookieLaw()){return true}return false},maySendCookies:function(){if(!this.cookieLawApplies()){return true}if(this.consented()){return true}return false},consented:function(){return this._jc||(this.getCookie(this.options.cookieName)==="yes")},reset:function(){this.setCookie(this.options.cookieName,"",true);this.setCookie(this.options.iconStatusCookieName,"",true);this.setCookie("ccNoPopup","",true)},initWidget:function(){if(!this.cookieLawApplies()){return}if(this.getCookie(this.options.iconStatusCookieName)==="no"){return}this.initShowCookieWidget()},initShowCookieWidget:function(){var e=this.consented();if(jQuery("#cccwr .ccc-outer").length){return}jQuery("head").append('<style type="text/css">'+this.options.css+"</style>");jQuery("body").prepend(this.options.html);var a=jQuery("#ccc-icon");var c=jQuery("#ccc-state");jQuery("#cccwr").addClass("ccc-"+this.options.position);a.addClass("ccc-"+this.options.shape);jQuery("#cccwr .ccc-intro").append(this.options.introText);jQuery("#cccwr .ccc-expanded").prepend(this.options.fullText);jQuery("#cccwr").addClass("ccc-"+this.options.theme);a.show();c.addClass(e?"ccc-go":"ccc-pause");var d=this.getCookie(this.options.cookieName);switch(this.options.consentModel){case"information_only":c.removeClass("ccc-pause").addClass("ccc-go");jQuery("#cctoggle-text").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);break;case"implicit":jQuery("#cccwr #ccc-cookies-switch").show();if(!d){c.removeClass("ccc-pause").addClass("ccc-go");jQuery("#cctoggle-text").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);CookieControl._jc=true;CookieControl.acceptEvent();CookieControl.setCookie(CookieControl.options.cookieName,"yes");CookieControl.cookiesAllowedEvent()}CookieControl.options.protectedCookies.push(CookieControl.options.cookieName);break;case"explicit":var b=this.getCookie("ccNoPopup");if(b=="no"){jQuery("#cccwr #cchide-popup").attr("checked",true)}else{jQuery("#cccwr #cchide-popup").removeAttr("checked")}jQuery("#cccwr #ccc-cookies-switch").show();jQuery("#cctoggle-text").addClass("cctoggle-text-off");jQuery("#cctoggle-text").val(CookieControl.options.cookieOffText);break}if(this.options.consentModel!="information_only"){if(d=="yes"){jQuery("#cccwr #ccc-cookies-switch #ccc-cookies-checkbox").attr("checked",true);jQuery("#cctoggle").addClass("cctoggle-on");jQuery("#cctoggle-text").removeClass("cctoggle-text-off").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText)}else{if(!d&&this.options.consentModel=="implicit"){jQuery("#cccwr #ccc-cookies-switch #ccc-cookies-checkbox").attr("checked",true);jQuery("#cctoggle").addClass("cctoggle-on");jQuery("#cctoggle-text").removeClass("cctoggle-text-off").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText)}else{jQuery("#cccwr #ccc-cookies-switch #ccc-cookies-checkbox").removeAttr("checked");jQuery("#cctoggle").removeClass("cctoggle-on");jQuery("#cctoggle-text").removeClass("cctoggle-text-on").addClass("cctoggle-text-off");jQuery("#cctoggle-text").html(CookieControl.options.cookieOffText);if(CookieControl.options.consentModel=="implicit"){jQuery("#cccwr #ccc-implicit-warning").show()}else{if(CookieControl.options.consentModel=="explicit"){jQuery("#cccwr #ccc-explicit-checkbox").show()}}}}}else{if(d==false){c.removeClass("ccc-pause").addClass("ccc-go");jQuery("#cctoggle-text").removeClass("cctoggle-text-off").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);CookieControl._jc=true;CookieControl.acceptEvent();CookieControl.setCookie(CookieControl.options.cookieName,"yes");CookieControl.cookiesAllowedEvent()}}a.click(function(f){f.preventDefault();jQuery("#cccwr .ccc-widget").clearQueue().fadeToggle(CookieControl.options.clickFadeSpeed)});jQuery("#cccwr #cchide-popup").click(function(g){var f=jQuery(this).attr("checked");var h=CookieControl;if(f==true){h.setCookie("ccNoPopup","no");jQuery("#cccwr .ccc-widget").fadeOut(CookieControl.options.clickFadeSpeed)}else{h.setCookie("ccNoPopup","",true)}});jQuery("#cccwr .ccc-close").click(function(f){f.preventDefault();jQuery("#cccwr .ccc-widget").clearQueue().fadeOut(CookieControl.options.clickFadeSpeed)});jQuery("#cccwr .ccc-expand").click(function(){var f=jQuery(this);if(jQuery(".ccc-expanded").css("display")==="none"){jQuery(".ccc-expanded").slideDown(200,function(){f.text("read Less")});jQuery(this).css({backgroundPosition:"center 0"})}else{jQuery(".ccc-expanded").slideUp(200,function(){f.text("read More")});jQuery(this).css({backgroundPosition:"center -9px"})}});jQuery("#cctoggle").click(function(){if(jQuery(this).hasClass("cctoggle-on")){jQuery("#cctoggle-text").html("");jQuery("#cctoggle-text").removeClass("cctoggle-text-on");jQuery(this).animate({"background-position-x":"0"},250,function(){jQuery(this).removeClass("cctoggle-on");c.removeClass("ccc-go").addClass("ccc-pause");CookieControl._jc=false;if(CookieControl.options.consentModel!="explicit"){CookieControl.setCookie(CookieControl.options.cookieName,"no")}else{CookieControl.setCookie(CookieControl.options.cookieName,"",true)}CookieControl.cookiesNotAllowedEvent();if(CookieControl.options.consentModel=="implicit"){jQuery("#cccwr #ccc-implicit-warning").slideDown();jQuery("#cccwr .ccc-widget").fadeOut(5000)}else{if(CookieControl.options.consentModel=="explicit"){if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)===7){jQuery("#cccwr #ccc-explicit-checkbox").show()}else{jQuery("#cccwr #ccc-explicit-checkbox").slideDown()}}}jQuery("#cctoggle-text").addClass("cctoggle-text-off");jQuery("#cctoggle-text").html(CookieControl.options.cookieOffText);CookieControl.delAllCookies(CookieControl.options.protectedCookies)})}else{jQuery("#cctoggle-text").html("");jQuery("#cctoggle-text").removeClass("cctoggle-text-off");jQuery(this).animate({"background-position-x":"100%"},250,function(){jQuery(this).addClass("cctoggle-on");c.removeClass("ccc-pause").addClass("ccc-go");CookieControl._jc=true;CookieControl.acceptEvent();CookieControl.setCookie(CookieControl.options.cookieName,"yes");CookieControl.cookiesAllowedEvent();if(CookieControl.options.consentModel=="implicit"){jQuery("#cccwr #ccc-implicit-warning").slideUp()}else{if(CookieControl.options.consentModel=="explicit"){jQuery("#cccwr #ccc-explicit-checkbox").slideUp()}}jQuery("#cctoggle-text").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);jQuery("#cccwr .ccc-widget").fadeOut(2000)})}});var b=this.getCookie("ccNoPopup");if(this.options.startOpen&&d!="yes"&&d!="no"&&b!="no"){jQuery("#cccwr .ccc-widget").fadeIn(this.options.clickFadeSpeed).delay(this.options.autoHide).fadeOut(this.options.clickFadeSpeed,function(){if(!CookieControl.getCookie(CookieControl.options.cookieName)&&CookieControl.options.consentModel!="explicit"){CookieControl._jc=false;CookieControl.setCookie(CookieControl.options.cookieName,"no");CookieControl.cookiesNotAllowedEvent()}});jQuery("#cccwr .ccc-widget").mouseover(function(){jQuery("#cccwr .ccc-widget").clearQueue();if(!CookieControl.getCookie(CookieControl.options.cookieName)&&CookieControl.options.consentModel!="explicit"){CookieControl._jc=false;CookieControl.setCookie(CookieControl.options.cookieName,"no");CookieControl.cookiesNotAllowedEvent()}})}},countryHasCookieLaw:function(){if(this.options.countries&&typeof(geoplugin_countryName)==="function"){var a=geoplugin_countryName().replace(/^\s+|\s+$/g,"");if(typeof(this.options.countries)==="string"){this.options.countries=this.options.countries.split(/\s*,\s*/)}return jQuery.inArray(geoplugin_countryName().replace(/^\s+|\s+$/g,""),this.options.countries)>=0}return true},checkShowIconState:function(){var a=CookieControl;if(jQuery(".ccc-widget input[name=showicon]:checked").val()==="N"){this.setCookie(a.options.iconStatusCookieName,"no");return true}else{this.setCookie(a.options.iconStatusCookieName,"yes");return false}},setCookie:function(a,k,b,l){var e="Thursday, 01-Jan-1970 00:00:01 GMT";if(!b){var g=new Date();var d=1000*60*60*24*90;var c=new Date(g.getTime()+d);var e=c.toGMTString()}var f=this.options.domain;if(f.length===0){var i=window.location.hostname;var h=2;if(i.match(/\.(gov|police|org|co|uk|ltd|me|plc|ac|net)\.\w{2}/)){h=3}var j=i.split(".").reverse();j.length=h;f=j.reverse().toString().replace(/,/g,".")}if(this.options.subdomains===true){domainString=";domain="+f}else{domainString=";domain="+i}document.cookie=a+"="+k+";expires="+e+";path="+this.options.cookiePath+domainString},getCookie:function(a){var b=false;jQuery.each(document.cookie.split(";"),function(e,f){var d=f.split("=");if(d[0].replace(/^\s+|\s+$/g,"")===a){b=unescape(d[1]);return false}});if("undefined"===typeof b){b=false}return b},delCookie:function(a,c,d){var c=c||document.domain;var d=d||"/";var b=a+"=;expires=Thursday, 01-Jan-1970 00:00:01 GMT;; domain="+c+"; path="+d;document.cookie=b},delAllCookies:function(d){if(!this.options.autoDelete){return}var e=document.cookie.split(/;\s*/);var c;for(c=0;c<e.length;c++){var b=e[c];var f=b.indexOf("=");var a=f>-1?b.substr(0,f):b;if(jQuery.inArray(a,d)<0){this.setCookie(a,"",true);this.delCookie(a)}}},acceptEvent:function(a){if(this.firedAcceptEvent||this.getCookie(this.options.cookieName)==="yes"){return}this.firedAcceptEvent=true;if(typeof(this.options.onAccept)=="function"){this.options.onAccept(this)}return a},readyEvent:function(a){if(typeof(this.options.onReady)=="function"){this.options.onReady(this)}return a},cookiesNotAllowedEvent:function(a){if(typeof(this.options.onCookiesNotAllowed)=="function"){this.options.onCookiesNotAllowed(this)}return a},cookiesAllowedEvent:function(a){if(typeof(this.options.onCookiesAllowed)=="function"){this.options.onCookiesAllowed(this)}return a}};
   //]]>
</script>
24 May 2018, 9:29 AM
#134
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

I do see a cookie banner at the bottom of the screen, but that is not this cookie consent module.

marton_1:

Darn, what did I do wrong. :blush:

I installed on my xampp test PC and it worked fine.

Now I transferred it to my online test site here (some images not yet installed) but the icon and pop up do not show up. I can configure Cookie Control admin OK and according to the log it is blocking the Google Analytics cookies OK. No other logged errors.

Maybe it does not like being in a sub domain?

I looked at the page source (see below) and the code is there but I do not know if anything is wrong or missing :dontgetit

// cookieControl version 5.1 (2012-06-19, RA, leigh)
// Copyright (c) 2012 Civic UK (http://www.civicuk.com/cookie-law/)
function cookieControl(a){if(typeof(a)=="undefined"){a={pollPeriod:25,pollIncrement:1.25}}a.pollPeriod=a.pollPeriod||25;a.pollIncrement=a.pollIncrement||1.25;a.jQueryUrl=a.jQueryUrl||"https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js";if(typeof(jQuery)=="undefined"||parseInt(jQuery.fn.jquery.replace(/./g,""))<144){document.write('<script type="text/javascript" src="'+a.jQueryUrl+'"></script>')}_cookieControlPoll(a)}function _cookieControlPoll(a){if(typeof(jQuery)=="undefined"){setTimeout(function(){_cookieControlPoll(a)},a.pollPeriod);a.pollPeriod*=a.pollIncrement}else{jQuery(function(){CookieControl.init(a)})}}var CookieControl={options:{countries:"United Kingdom",shape:"triangle",position:"left",theme:"light",introText:"~introduction_text",fullText:"~full_text",cookieOnText:"Cookies are on",cookieOffText:"Cookies are off",cookieName:"civicAllowCookies",protectedCookies:[],iconStatusCookieName:"civicShowCookieIcon",cookiePath:"/",clickFadeSpeed:1000,acceptDelay:400,startOpen:false,autoHide:60000,autoDelete:60000,domain:"",subdomains:true,html:'<div id="cccwr"><div id="ccc-state" class="ccc-pause"><div id="ccc-icon"><button><span>Cookie Control</span></button></div><div class="ccc-widget"><div class="ccc-outer"><div class="ccc-inner"><h2>Cookie Control</h2><div class="ccc-content"><p class="ccc-intro"></p><div class="ccc-expanded"></div><div id="ccc-cookies-switch" style="background-position-x: 0;"><a id="cctoggle" style="background-position-x: 0;"><span id="cctoggle-text">Cookies test</span></a></div><div id="ccc-implicit-warning">(One cookie will be set to store your preference)</div><div id="ccc-explicit-checkbox"><label><input id="cchide-popup" type="checkbox" name="ccc-hide-popup" value="Y" /> Do not ask me again <br /></label>(Ticking this sets a cookie to hide this popup if you then hit close. This will not store any personal information)</div><p class="ccc-about"><small><a href="http://www.civicuk.com/cookie-law" target="_blank" >about this tool</a></small></p><a class="ccc-icon" href="http://www.civicuk.com/cookie-law" target="_blank" title="About Cookie Control">About Cookie Control</a><button class="ccc-close">Close</button></div></div></div><button class="ccc-expand">read More</button></div></div></div>',onReady:null,onCookiesAllowed:null,onCookiesNotAllowed:null,onAccept:null,consentModel:"information_only"},init:function(a){this._jc=false;this.options=jQuery.extend(this.options,a);this.initWidget();this.readyEvent();if(this.maySendCookies()){this.cookiesAllowedEvent()}else{this.cookiesNotAllowedEvent()}},cookieLawApplies:function(){if(this.countryHasCookieLaw()){return true}return false},maySendCookies:function(){if(!this.cookieLawApplies()){return true}if(this.consented()){return true}return false},consented:function(){return this._jc||(this.getCookie(this.options.cookieName)==="yes")},reset:function(){this.setCookie(this.options.cookieName,"",true);this.setCookie(this.options.iconStatusCookieName,"",true);this.setCookie("ccNoPopup","",true)},initWidget:function(){if(!this.cookieLawApplies()){return}if(this.getCookie(this.options.iconStatusCookieName)==="no"){return}this.initShowCookieWidget()},initShowCookieWidget:function(){var e=this.consented();if(jQuery("#cccwr .ccc-outer").length){return}jQuery("head").append('<style type="text/css">'+this.options.css+"</style>");jQuery("body").prepend(this.options.html);var a=jQuery("#ccc-icon");var c=jQuery("#ccc-state");jQuery("#cccwr").addClass("ccc-"+this.options.position);a.addClass("ccc-"+this.options.shape);jQuery("#cccwr .ccc-intro").append(this.options.introText);jQuery("#cccwr .ccc-expanded").prepend(this.options.fullText);jQuery("#cccwr").addClass("ccc-"+this.options.theme);a.show();c.addClass(e?"ccc-go":"ccc-pause");var d=this.getCookie(this.options.cookieName);switch(this.options.consentModel){case"information_only":c.removeClass("ccc-pause").addClass("ccc-go");jQuery("#cctoggle-text").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);break;case"implicit":jQuery("#cccwr #ccc-cookies-switch").show();if(!d){c.removeClass("ccc-pause").addClass("ccc-go");jQuery("#cctoggle-text").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);CookieControl._jc=true;CookieControl.acceptEvent();CookieControl.setCookie(CookieControl.options.cookieName,"yes");CookieControl.cookiesAllowedEvent()}CookieControl.options.protectedCookies.push(CookieControl.options.cookieName);break;case"explicit":var b=this.getCookie("ccNoPopup");if(b=="no"){jQuery("#cccwr #cchide-popup").attr("checked",true)}else{jQuery("#cccwr #cchide-popup").removeAttr("checked")}jQuery("#cccwr #ccc-cookies-switch").show();jQuery("#cctoggle-text").addClass("cctoggle-text-off");jQuery("#cctoggle-text").val(CookieControl.options.cookieOffText);break}if(this.options.consentModel!="information_only"){if(d=="yes"){jQuery("#cccwr #ccc-cookies-switch #ccc-cookies-checkbox").attr("checked",true);jQuery("#cctoggle").addClass("cctoggle-on");jQuery("#cctoggle-text").removeClass("cctoggle-text-off").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText)}else{if(!d&&this.options.consentModel=="implicit"){jQuery("#cccwr #ccc-cookies-switch #ccc-cookies-checkbox").attr("checked",true);jQuery("#cctoggle").addClass("cctoggle-on");jQuery("#cctoggle-text").removeClass("cctoggle-text-off").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText)}else{jQuery("#cccwr #ccc-cookies-switch #ccc-cookies-checkbox").removeAttr("checked");jQuery("#cctoggle").removeClass("cctoggle-on");jQuery("#cctoggle-text").removeClass("cctoggle-text-on").addClass("cctoggle-text-off");jQuery("#cctoggle-text").html(CookieControl.options.cookieOffText);if(CookieControl.options.consentModel=="implicit"){jQuery("#cccwr #ccc-implicit-warning").show()}else{if(CookieControl.options.consentModel=="explicit"){jQuery("#cccwr #ccc-explicit-checkbox").show()}}}}}else{if(d==false){c.removeClass("ccc-pause").addClass("ccc-go");jQuery("#cctoggle-text").removeClass("cctoggle-text-off").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);CookieControl._jc=true;CookieControl.acceptEvent();CookieControl.setCookie(CookieControl.options.cookieName,"yes");CookieControl.cookiesAllowedEvent()}}a.click(function(f){f.preventDefault();jQuery("#cccwr .ccc-widget").clearQueue().fadeToggle(CookieControl.options.clickFadeSpeed)});jQuery("#cccwr #cchide-popup").click(function(g){var f=jQuery(this).attr("checked");var h=CookieControl;if(f==true){h.setCookie("ccNoPopup","no");jQuery("#cccwr .ccc-widget").fadeOut(CookieControl.options.clickFadeSpeed)}else{h.setCookie("ccNoPopup","",true)}});jQuery("#cccwr .ccc-close").click(function(f){f.preventDefault();jQuery("#cccwr .ccc-widget").clearQueue().fadeOut(CookieControl.options.clickFadeSpeed)});jQuery("#cccwr .ccc-expand").click(function(){var f=jQuery(this);if(jQuery(".ccc-expanded").css("display")==="none"){jQuery(".ccc-expanded").slideDown(200,function(){f.text("read Less")});jQuery(this).css({backgroundPosition:"center 0"})}else{jQuery(".ccc-expanded").slideUp(200,function(){f.text("read More")});jQuery(this).css({backgroundPosition:"center -9px"})}});jQuery("#cctoggle").click(function(){if(jQuery(this).hasClass("cctoggle-on")){jQuery("#cctoggle-text").html("");jQuery("#cctoggle-text").removeClass("cctoggle-text-on");jQuery(this).animate({"background-position-x":"0"},250,function(){jQuery(this).removeClass("cctoggle-on");c.removeClass("ccc-go").addClass("ccc-pause");CookieControl._jc=false;if(CookieControl.options.consentModel!="explicit"){CookieControl.setCookie(CookieControl.options.cookieName,"no")}else{CookieControl.setCookie(CookieControl.options.cookieName,"",true)}CookieControl.cookiesNotAllowedEvent();if(CookieControl.options.consentModel=="implicit"){jQuery("#cccwr #ccc-implicit-warning").slideDown();jQuery("#cccwr .ccc-widget").fadeOut(5000)}else{if(CookieControl.options.consentModel=="explicit"){if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)===7){jQuery("#cccwr #ccc-explicit-checkbox").show()}else{jQuery("#cccwr #ccc-explicit-checkbox").slideDown()}}}jQuery("#cctoggle-text").addClass("cctoggle-text-off");jQuery("#cctoggle-text").html(CookieControl.options.cookieOffText);CookieControl.delAllCookies(CookieControl.options.protectedCookies)})}else{jQuery("#cctoggle-text").html("");jQuery("#cctoggle-text").removeClass("cctoggle-text-off");jQuery(this).animate({"background-position-x":"100%"},250,function(){jQuery(this).addClass("cctoggle-on");c.removeClass("ccc-pause").addClass("ccc-go");CookieControl._jc=true;CookieControl.acceptEvent();CookieControl.setCookie(CookieControl.options.cookieName,"yes");CookieControl.cookiesAllowedEvent();if(CookieControl.options.consentModel=="implicit"){jQuery("#cccwr #ccc-implicit-warning").slideUp()}else{if(CookieControl.options.consentModel=="explicit"){jQuery("#cccwr #ccc-explicit-checkbox").slideUp()}}jQuery("#cctoggle-text").addClass("cctoggle-text-on");jQuery("#cctoggle-text").html(CookieControl.options.cookieOnText);jQuery("#cccwr .ccc-widget").fadeOut(2000)})}});var b=this.getCookie("ccNoPopup");if(this.options.startOpen&&d!="yes"&&d!="no"&&b!="no"){jQuery("#cccwr .ccc-widget").fadeIn(this.options.clickFadeSpeed).delay(this.options.autoHide).fadeOut(this.options.clickFadeSpeed,function(){if(!CookieControl.getCookie(CookieControl.options.cookieName)&&CookieControl.options.consentModel!="explicit"){CookieControl._jc=false;CookieControl.setCookie(CookieControl.options.cookieName,"no");CookieControl.cookiesNotAllowedEvent()}});jQuery("#cccwr .ccc-widget").mouseover(function(){jQuery("#cccwr .ccc-widget").clearQueue();if(!CookieControl.getCookie(CookieControl.options.cookieName)&&CookieControl.options.consentModel!="explicit"){CookieControl._jc=false;CookieControl.setCookie(CookieControl.options.cookieName,"no");CookieControl.cookiesNotAllowedEvent()}})}},countryHasCookieLaw:function(){if(this.options.countries&&typeof(geoplugin_countryName)==="function"){var a=geoplugin_countryName().replace(/^\s+|\s+$/g,"");if(typeof(this.options.countries)==="string"){this.options.countries=this.options.countries.split(/\s*,\s*/)}return jQuery.inArray(geoplugin_countryName().replace(/^\s+|\s+$/g,""),this.options.countries)>=0}return true},checkShowIconState:function(){var a=CookieControl;if(jQuery(".ccc-widget input[name=showicon]:checked").val()==="N"){this.setCookie(a.options.iconStatusCookieName,"no");return true}else{this.setCookie(a.options.iconStatusCookieName,"yes");return false}},setCookie:function(a,k,b,l){var e="Thursday, 01-Jan-1970 00:00:01 GMT";if(!b){var g=new Date();var d=100060602490;var c=new Date(g.getTime()+d);var e=c.toGMTString()}var f=this.options.domain;if(f.length===0){var i=window.location.hostname;var h=2;if(i.match(/.(gov|police|org|co|uk|ltd|me|plc|ac|net).\w{2}/)){h=3}var j=i.split(".").reverse();j.length=h;f=j.reverse().toString().replace(/,/g,".")}if(this.options.subdomains===true){domainString=";domain="+f}else{domainString=";domain="+i}document.cookie=a+"="+k+";expires="+e+";path="+this.options.cookiePath+domainString},getCookie:function(a){var b=false;jQuery.each(document.cookie.split(";"),function(e,f){var d=f.split("=");if(d[0].replace(/^\s+|\s+$/g,"")===a){b=unescape(d[1]);return false}});if("undefined"===typeof b){b=false}return b},delCookie:function(a,c,d){var c=c||document.domain;var d=d||"/";var b=a+"=;expires=Thursday, 01-Jan-1970 00:00:01 GMT;; domain="+c+"; path="+d;document.cookie=b},delAllCookies:function(d){if(!this.options.autoDelete){return}var e=document.cookie.split(/;\s*/);var c;for(c=0;c<e.length;c++){var b=e[c];var f=b.indexOf("=");var a=f>-1?b.substr(0,f):b;if(jQuery.inArray(a,d)<0){this.setCookie(a,"",true);this.delCookie(a)}}},acceptEvent:function(a){if(this.firedAcceptEvent||this.getCookie(this.options.cookieName)==="yes"){return}this.firedAcceptEvent=true;if(typeof(this.options.onAccept)=="function"){this.options.onAccept(this)}return a},readyEvent:function(a){if(typeof(this.options.onReady)=="function"){this.options.onReady(this)}return a},cookiesNotAllowedEvent:function(a){if(typeof(this.options.onCookiesNotAllowed)=="function"){this.options.onCookiesNotAllowed(this)}return a},cookiesAllowedEvent:function(a){if(typeof(this.options.onCookiesAllowed)=="function"){this.options.onCookiesAllowed(this)}return a}};
//]=]=>
</script>

24 May 2018, 11:23 AM
#135
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Design75:

I do see a cookie banner at the bottom of the screen, but that is not this cookie consent module.

Many thanks for your fast reply.

My live website here does have a non cookie consent module cookie banner at the bottom of the screen but my test site does not.
There is a failure in my test site if you change the language it transfers you to the live site with the non cookie consent module banner.

I f you want to see my test site in German language then please click here.

The problem with the non cookie consent module banner is I just discovered it does not block Google Analytics cookies!

24 May 2018, 11:33 AM
#136
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

marton_1:

Many thanks for your fast reply.

My live website here does have a non cookie consent module cookie banner at the bottom of the screen but my test site does not.
There is a failure in my test site if you change the language it transfers you to the live site with the non cookie consent module banner.

I f you want to see my test site in German language then please click here.

The problem with the non cookie consent module banner is I just discovered it does not block Google Analytics cookies!

Looking at the source of your site the code stops after : "<!-- End Google Tag Manager -->"

So it looks like an error.
Check your log files for the error

24 May 2018, 12:22 PM
#137
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Design75:

Looking at the source of your site the code stops after : "<!-- End Google Tag Manager -->"

So it looks like an error.
Check your log files for the error

Thanks for your patience

The errors shown in my log files are all of the form

[24-May-2018 13:31:11 Europe/Zurich] PHP Warning:  require(includes/templates/template_default/google_analytics/google_remarketing.php): failed to open stream: No such file or directory in.......
PHP Fatal error:  require(): Failed opening required 'includes/templates/template_default/google_analytics/google_remarketing.php' (include_path='.:/usr/share/pear:/usr/share/php') in 

I looked in my tpl_main_page.php file (this is the only file containing Google Tag Manager) starting at Google Tag Manager and it looks like this

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WL8TRM"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','[XXXXXXX]');</script>
<!-- End Google Tag Manager -->



<?php /* add any end-of-page code via an observer class */
  $zco_notifier->notify('NOTIFY_FOOTER_END', $current_page);
?>

<?php // Google Analytics Dynamic Remarketing code
	require($template->get_template_dir('.php',DIR_WS_TEMPLATE, 	$current_page_base,'google_analytics') . '/google_remarketing.php');
	?>

<!--BOF cookie control script-->
<?php if (COOKIE_CONTROL_STATUS == 'true'){?>
<?php require($template->get_template_dir('tpl_cookie_control.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_cookie_control.php');?>
<?php } ?>
<!--EOF cookie control script-->

</body>
24 May 2018, 12:56 PM
#138
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Cookie Control [Support Thread]

The tag manager is not the problem :smile:
The reports the file includes/templates/template_default/google_analytics/google_remarketing.php is missing. See the code in your tpl_main_page.php just below the tag manager code.

marton_1:

Thanks for your patience

The errors shown in my log files are all of the form

[24-May-2018 13:31:11 Europe/Zurich] PHP Warning: require(includes/templates/template_default/google_analytics/google_remarketing.php): failed to open stream: No such file or directory in.......
PHP Fatal error: require(): Failed opening required 'includes/templates/template_default/google_analytics/google_remarketing.php' (include_path='.:/usr/share/pear:/usr/share/php') in

> 
> I looked in my tpl_main_page.php file (this is the only file containing Google Tag Manager) starting at Google Tag Manager and it looks like this
> ```
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WL8TRM"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','[XXXXXXX]');</script>
<!-- End Google Tag Manager -->



<?php /* add any end-of-page code via an observer class */
  $zco_notifier->notify('NOTIFY_FOOTER_END', $current_page);
?>

<?php // Google Analytics Dynamic Remarketing code
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE,     $current_page_base,'google_analytics') . '/google_remarketing.php');
    ?>

<!--BOF cookie control script-->
<?php if (COOKIE_CONTROL_STATUS == 'true'){?>
<?php require($template->get_template_dir('tpl_cookie_control.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_cookie_control.php');?>
<?php } ?>
<!--EOF cookie control script-->

</body>
24 May 2018, 2:05 PM
#139
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Many thanks

I installed the missing google analytics file and it works fine.

I will go and stand in the corner now :blush:

28 May 2018, 2:07 PM
#140
johnmalone64 avatar

johnmalone64

New Zenner

Join Date:
Feb 2018
Posts:
4
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Have installed this on bobandjamie.co.uk using ZenCart 1.5.5f but a problem as below.

Attachment 17870

What have I done wrong ?