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

Cookie Control [Support Thread]

Views: 54,574

Results 21 to 40 of 174
30 Oct 2012, 8:08 PM
#21
design75 avatar

design75

Totally Zenned

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

Cookie Control [Support Thread]

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

30 Oct 2012, 8:42 PM
#22
design75 avatar

design75

Totally Zenned

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

Re: Cookie Control [Support Thread]

You also have a rewrite module for your urls active, maybe that's not configured properly

7 Nov 2012, 2:32 PM
#23
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 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

13 Nov 2012, 8:31 PM
#24
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
730
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

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.

14 Nov 2012, 9:14 AM
#25
design75 avatar

design75

Totally Zenned

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

Re: Cookie Control [Support Thread]

HeathenMagic:

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

30 Nov 2012, 10:03 PM
#26
bn17311 avatar

bn17311

Zen Follower

Join Date:
Apr 2010
Posts:
319
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Hi,
i have installed this but think it is effecting my ssl, no padlock showing

https://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

<?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 } ?>

can anyone let me know if this is correct

thanks
bn

1 Dec 2012, 7:58 AM
#27
design75 avatar

design75

Totally Zenned

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

Re: Cookie Control [Support Thread]

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

<?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>

I had not noticed this fault myself, because I use an altered version to work with the Simple analytics module from berezin

1 Dec 2012, 9:26 AM
#28
bn17311 avatar

bn17311

Zen Follower

Join Date:
Apr 2010
Posts:
319
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

thanks

bn

7 Dec 2012, 9:34 AM
#29
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 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
7 Jan 2013, 2:05 PM
#30
painsworth avatar

painsworth

New Zenner

Join Date:
Jan 2013
Posts:
2
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

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

7 Jan 2013, 5:34 PM
#31
painsworth avatar

painsworth

New Zenner

Join Date:
Jan 2013
Posts:
2
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

I've done a bit more digging and it appears to be a jquery problem on a sub-domain, the Zencart site I installed it on was a test site which was a sub-domain. I've installed it on a www. domain and the cookie control appears ok.
Though I am seeing a problem on IE7 - the text at the top of the box doesn't display correctly - the 'c' icon just repeats obscuring the words 'Cookie Control'. IE8 and IE9 appear ok...

Thanks, Peter

7 Jan 2013, 7:57 PM
#32
design75 avatar

design75

Totally Zenned

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

Re: Cookie Control [Support Thread]

thanks for the update :thumbsup: The lay out of cookie control is out of the box as done by the developers of civic, and I must admit didn't really bother to check on older browsers for that.

8 Jan 2013, 10:27 AM
#33
tsrplatelayer avatar

tsrplatelayer

Zen Follower

Join Date:
Oct 2010
Location:
Shropshire
Posts:
177
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Just installed - straight forward for a novice - great. Its on http://www.freight-stop-shop.co.uk/tickets/

I wonder if I missed something -
Normally when you 'mouse over' a button the button changes colour and the mouse pointer changes to a 'hand'.
Why is this not the case when the mouse goes over the 'cookie toggle' button?

Is the cookie toogle button supposed to look as it does? with the 'green 'On' to the right, and the red 'Off' to the left and the On/Off buttons not lined up?

Currently we dont use google analytics - but the 'onAccept' jscript code still calls ccAddAnalytics - should it? I tried setting the analytics string to an empty string - but it is still called - I had expected that with the string empty the code generated for onAccept would not call ccAddAnalytics.

Any advice appreciated.

Allan

8 Jan 2013, 10:36 AM
#34
tsrplatelayer avatar

tsrplatelayer

Zen Follower

Join Date:
Oct 2010
Location:
Shropshire
Posts:
177
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Just checked on http://www.civicuk.com/cookie-law/index
and the mouse over changes to a hand - but the image does not change colour,

but this is not the case on my installation.

Allan

8 Jan 2013, 1:24 PM
#35
tsrplatelayer avatar

tsrplatelayer

Zen Follower

Join Date:
Oct 2010
Location:
Shropshire
Posts:
177
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Ha-Ha - got it
I compared the JS used on Civics site with the JS supplied in the app and found a difference. I made the following change to
includes/templates/custom/jscript/jscript_cookieControl-5.1.min.php

<a id="cctoggle" style="background-position-x: 0;">

changed to

<a id="cctoggle" href="#" style="background-position-x: 0;">

and now the pointer changes to a finger as it should.

8 Jan 2013, 3:51 PM
#36
tsrplatelayer avatar

tsrplatelayer

Zen Follower

Join Date:
Oct 2010
Location:
Shropshire
Posts:
177
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Rats - that fixes the pointer but clicking the button returns to the home page. I guess thats why it was taken out.
Can PHP not be used to build a string so that the current page is referenced in full?

8 Jan 2013, 4:09 PM
#37
tsrplatelayer avatar

tsrplatelayer

Zen Follower

Join Date:
Oct 2010
Location:
Shropshire
Posts:
177
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

How about adding add the top

<?php 
$pageURL = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
$pageURL .= $_SERVER['SERVER_PORT'] != '80' ? $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"] : $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
?>

and then change

<a id="cctoggle" href="#" style="background-position-x: 0;">

to

<a id="cctoggle" href="<?php echo $pageURL ; ?>" style="background-position-x: 0;">

seems to build the correct URL for individual pages - but i am not an expert - so what does anyone think.

Allan

16 Feb 2013, 11:25 AM
#38
spid3r1987 avatar

spid3r1987

Zen Follower

Join Date:
Jul 2009
Posts:
497
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

Hi there, iv added my google analytics code to the module in the box provided
but yet after 2 days google is still saying its not installed :S

26 Feb 2013, 1:41 PM
#39
tsrplatelayer avatar

tsrplatelayer

Zen Follower

Join Date:
Oct 2010
Location:
Shropshire
Posts:
177
Plugin Contributions:
0

Re: Cookie Control [Support Thread]

see my earlier post this thread 8 Jan
Seems that mod doesn't work at all -
Yes the pointer works properly and yes the URL's generated are correct but for whatever reason it no longer enables/disables cookies and I cant see why.

Can anyone help me out with this please.

26 Feb 2013, 1:57 PM
#40
design75 avatar

design75

Totally Zenned

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

Re: Cookie Control [Support Thread]

tsrplatelayer:

see my earlier post this thread 8 Jan
Seems that mod doesn't work at all -
Yes the pointer works properly and yes the URL's generated are correct but for whatever reason it no longer enables/disables cookies and I cant see why.

Can anyone help me out with this please.

I just looked at your site, and it seems to be working fine. Try clearing your cache and cookies