looking at your source code it is not only the script loading twice, but all you css an scripts.
Once the normal way and once minified.
I think you did something wrong in your header.php file when you installed the css loader
Printable View
looking at your source code it is not only the script loading twice, but all you css an scripts.
Once the normal way and once minified.
I think you did something wrong in your header.php file when you installed the css loader
You also have a rewrite module for your urls active, maybe that's not configured properly
I submitted version 1.3
The biggest change is the removal of the css from the javascript, and putting it in its own css file. This way it is much easier to customize. It also makes the script a lot smaller.
The seccond change is also in jscript_cookieControl-5.1.min.php. I changed some code, so the jquery from google will be called using https when applicable
Hello there,
Is there a way to disable the script on secure pages? I get the 'do you want to display insecure content' on checkout and login. Thanks for any help with this, it is a great module by the way.
If you install version 1.3, it should resolve your problem. I had the same, which was the main reason this latest version was created.
You only need to replace the file "includes\templates\YOUR_TEMPLATE\jscript\jscript_cookieControl-5.1.min.php" , and add "includes\templates\YOUR_TEMPLATE\css\stylesheet_cookie_control.css" from the new file package
Hi,
i have installed this but think it is effecting my ssl, no padlock showing
www.onyourbike.co.uk
have i installed it properly ?
i did change 2 files and got padlock to show but have removed it in case im not correct
i changed the 3 images in css file, i uploaded them to my site and changed
*background-image: url(./includes/templates/onyourbike/images/ccc-icons.gif);
*background-image: url(./includes/templates/onyourbike/images/widget-x.gif);
*background-image: url(./includes/templates/onyourbike/images/switch.png);
i changed tpl_cookie_control.php
can anyone let me know if this is correctPHP Code:
<?php
if ($request_type == 'NONSSL') { ?>
<script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
<?php } else { ?>
<script src="https://ssl.geoplugin.net/javascript.gp" type="text/javascript"></script>
<?php } ?>
<?php if ($request_type == 'NONSSL') { ?>
<script type="text/javascript">//<![CDATA[
cookieControl({
introText:'<?php echo COOKIE_CONTROL_INTROTEXT;?>',
fullText:'<p><?php echo COOKIE_CONTROL_FULLTEXT;?> <a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG;?>index.php?main_page=privacy">Privacy Policy</a>.</p>',
cookieOnText:'<?php echo COOKIE_CONTROL_COOKIES_ON;?>',
cookieOffText:'<?php echo COOKIE_CONTROL_COOKIES_OFF;?>',
position:'<?php echo COOKIE_CONTROL_POSITION;?>',
shape:'<?php echo COOKIE_CONTROL_SHAPE;?>',
theme:'<?php echo COOKIE_CONTROL_THEME;?>',
startOpen:<?php echo COOKIE_CONTROL_STARTOPEN;?>, // true , false
autoHide:<?php echo COOKIE_CONTROL_AUTOHIDE;?>, // Time in miliseconds
protectedCookies: [<?php echo COOKIE_CONTROL_PROTECTEDCOOKIES;?>], //list the cookies you do not want deleted ['analytics', 'twitter']
consentModel:'<?php echo COOKIE_CONTROL_CONSENTMODEL;?>', // information_only , implicit , explicit
subdomains:<?php echo COOKIE_CONTROL_SUBDOMAINS;?>, // true , false
onAccept:function(){ccAddAnalytics();},
onReady:function(){},
onCookiesAllowed:function(){ccAddAnalytics();},
onCookiesNotAllowed:function(){},
countries:'<?php echo COOKIE_CONTROL_COUNTRIES;?>' // Or supply a list ['United Kingdom', 'Greece']
});
function ccAddAnalytics() {
jQuery.getScript("http://www.google-analytics.com/ga.js", function() {
var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ; ?>');
GATracker._trackPageview();
});
}
//]]>
</script>
<?php } else { ?>
<script type="text/javascript">//<![CDATA[
cookieControl({
introText:'<?php echo COOKIE_CONTROL_INTROTEXT;?>',
fullText:'<p><?php echo COOKIE_CONTROL_FULLTEXT;?> <a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG;?>index.php?main_page=privacy">Privacy Policy</a>.</p>',
cookieOnText:'<?php echo COOKIE_CONTROL_COOKIES_ON;?>',
cookieOffText:'<?php echo COOKIE_CONTROL_COOKIES_OFF;?>',
position:'<?php echo COOKIE_CONTROL_POSITION;?>',
shape:'<?php echo COOKIE_CONTROL_SHAPE;?>',
theme:'<?php echo COOKIE_CONTROL_THEME;?>',
startOpen:<?php echo COOKIE_CONTROL_STARTOPEN;?>, // true , false
autoHide:<?php echo COOKIE_CONTROL_AUTOHIDE;?>, // Time in miliseconds
protectedCookies: [<?php echo COOKIE_CONTROL_PROTECTEDCOOKIES;?>], //list the cookies you do not want deleted ['analytics', 'twitter']
consentModel:'<?php echo COOKIE_CONTROL_CONSENTMODEL;?>', // information_only , implicit , explicit
subdomains:<?php echo COOKIE_CONTROL_SUBDOMAINS;?>, // true , false
onAccept:function(){ccAddAnalytics();},
onReady:function(){},
onCookiesAllowed:function(){ccAddAnalytics();},
onCookiesNotAllowed:function(){},
countries:'<?php echo COOKIE_CONTROL_COUNTRIES;?>' // Or supply a list ['United Kingdom', 'Greece']
});
function ccAddAnalytics() {
jQuery.getScript("https://www.google-analytics.com/ga.js", function() {
var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ; ?>');
GATracker._trackPageview();
});
}
//]]>
</script>
<?php } ?>
thanks
bn
Hi Brian,
You are right, the problem was the google code not being called through https.
I altered oyur solution a little to keep the code more maintainable
This is how it will look in a next release, if nothing else changes
I had not noticed this fault myself, because I use an altered version to work with the Simple analytics module from berezinPHP Code:
<?php
if ($request_type == 'NONSSL') { ?>
<script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
<?php } else { ?>
<script src="https://ssl.geoplugin.net/javascript.gp" type="text/javascript"></script>
<?php } ?>
<script type="text/javascript">//<![CDATA[
cookieControl({
introText:'<?php echo COOKIE_CONTROL_INTROTEXT;?>',
fullText:'<p><?php echo COOKIE_CONTROL_FULLTEXT;?> <a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG;?>index.php?main_page=privacy">Privacy Policy</a>.</p>',
cookieOnText:'<?php echo COOKIE_CONTROL_COOKIES_ON;?>',
cookieOffText:'<?php echo COOKIE_CONTROL_COOKIES_OFF;?>',
position:'<?php echo COOKIE_CONTROL_POSITION;?>',
shape:'<?php echo COOKIE_CONTROL_SHAPE;?>',
theme:'<?php echo COOKIE_CONTROL_THEME;?>',
startOpen:<?php echo COOKIE_CONTROL_STARTOPEN;?>, // true , false
autoHide:<?php echo COOKIE_CONTROL_AUTOHIDE;?>, // Time in miliseconds
protectedCookies: [<?php echo COOKIE_CONTROL_PROTECTEDCOOKIES;?>], //list the cookies you do not want deleted ['analytics', 'twitter']
consentModel:'<?php echo COOKIE_CONTROL_CONSENTMODEL;?>', // information_only , implicit , explicit
subdomains:<?php echo COOKIE_CONTROL_SUBDOMAINS;?>, // true , false
onAccept:function(){ccAddAnalytics();},
onReady:function(){},
onCookiesAllowed:function(){ccAddAnalytics();},
onCookiesNotAllowed:function(){},
countries:'<?php echo COOKIE_CONTROL_COUNTRIES;?>' // Or supply a list ['United Kingdom', 'Greece']
});
<?php if ($request_type == 'NONSSL') { ?>
function ccAddAnalytics() {
jQuery.getScript("http://www.google-analytics.com/ga.js", function() {
var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ; ?>');
GATracker._trackPageview();
});
<?php } else { ?>
function ccAddAnalytics() {
jQuery.getScript("https://www.google-analytics.com/ga.js", function() {
var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ; ?>');
GATracker._trackPageview();
});
<?php } ?>
}
//]]>
</script>
thanks
bn
I just submitted an update.
Version 1.4
Cookie Control v1.4 Change-log
- Resolved another https issue
- Added an option to hide Cookie Control completely after the customer has given consent
- Updated Readme
Hi,
cookie control version 1.4 - which I think is the latest version available for Zencart, in IE9 on a zencart 1.39 store, with the IE privacy settings set to 'Medium' or above, the cookie control seems to be blocked and doesn't appear.
Change privacy to low and the cookie control appears.
Ps: version 1.5 for wordpress doesn't seem to have this problem.
any help much appreciated...
Peter