Jump to content
JcMagpie

Support thread for GDPR Cookie Widgets V1.0 v2.3.4.1 CE

Recommended Posts

Simple addon any issues post here.

4 cookie widgets tab by JcMagpie 24-5-2018 V1.0 GDPR Cookie Widgets V1.0 v2.3.4.1 CE

 

4 individual addon’s that can add a cookie widget to your site. These are all set for EU GDPR requirements so customer can refuse cookies. If you don't want this then don't use these. You can chose 4 positions.

 

Top -Headder

Bottom -Footer

Left side

Right side

 

Only have one active at anyone time. Again totally standalone with no core code change. Once you have copied all the files over go into admin/Content /Modules and install the one you require

 

It uses the stock privacy.php to display statement. You can change the words displayed and change what is shown on links and buttons. The link to ocS privacy has to be edited in the templates of each addon. The colors can also be changes in the same file.

 

To add new text for each link simply edit one file in each addon .

 

/includes/modules/content/footer/templates/tpl_cm_footer_jcmcookief_links.php

 

/includes/modules/navbar_modules/templates/jcmnavcookie.php

 

/includes/modules/boxes/templates/jcmcookieleft.php

 

/includes/modules/boxes/templates/jcmcookieleft.php

 

Simply find the following and replace the stock text between each marking.

Only change the text marked ****************

 

 


"content": {
"message": "This website uses cookies to ensure you have the best experience on our website.",
"dismiss": "Got it!",
"deny": "Refuse Cookies",
"link": "Learn More",
"href": "https://www.tbyb.co.uk/privacy.php"

 

Don't forget to put in your own website!

This shows what it looks like, you can see the Nav bar working at the test site https://www.tbyb.co.uk/

image.png.d80ab5558a45638e3788b033e17c1b8a.png

Left and Right widgets.

image.png.10d5b36d9ecec3d882b4af18e5223586.png

 

Edited by JcMagpie
add image

 

Share this post


Link to post
Share on other sites
1 hour ago, JcMagpie said:

To add new text for each link simply edit one file in each addon .

...

Thanks for creating free modules :)

Shouldn't the text be pasted into some files in the language folders? This way the text is always in the same language no matter which language the customer selects/understands??

I think the same is true for your GDRP and info link addons!?

Share this post


Link to post
Share on other sites

just had a look, and it does not disable any cookies (Google Analytics) when i click on refuse cookies, looking at the documentation of the cookie script you, have to add  some extra code to disable any cookies.


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

I'm not sure about that cookie. But you can edit code to sute your need. This allows you to ads the widget with out changing core code. What you need to add will depend on what cookies you are using will be difernt for everyone.

Disabling cookies should be done with the callback hook, typical code would be.

You can replace or edit the code the widget runs as required.

https://cookieconsent.insites.com/documentation/javascript-api/#hooks

onInitialise: function (status) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},
 
onStatusChange: function(status, chosenBefore) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},
 
onRevokeChoice: function() {
  var type = this.options.type;
  if (type == 'opt-in') {
    // disable cookies
  }
  if (type == 'opt-out') {
    // enable cookies
  }
},

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

I understand some may not be able to edit code as needed to block cookies.

As a simple alternative you can use is a hosted solution, its free. Just go to the  website below and follow instruction. Then copy the script

generated and place it in the relevant file such as

/includes/modules/navbar_modules/templates/jcmnavcookie.php

This is a sample script.

 "text/javascript" "https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?theme=grey&tracking=1&thirdparty=1&always=1&noGeoIp=1&scrolling=1&refreshPage=1&showNoConsent=1&hideDetailsBtn=1&blocking=1&privacyPage=https%3A%2F%2Fwww.tbyb.co.uk%2Fprivacy.php"

Its for my test site so don’t use it other than to test. Go get your own from the site below.

https://cookie-bar.eu/#installation

Edited by JcMagpie
update

 

Share this post


Link to post
Share on other sites

This script should work as long as you have /privicy.php on your site.

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?theme=grey&tracking=1&thirdparty=1&always=1&scrolling=1&refreshPage=1&showNoConsent=1&blocking=1&privacyPage=%2Fprivacy.php"></script>

I have tested several scripts now and they all work to some degree or other. None have proven to block everything all the time.

If in so inclined the only way to make sure is to aske customer to turn of cookies in the browser. Even this can be complicated if they have no idea how to do it. However you can at least display the message “Turn off cookies in you browser”

 


 

Share this post


Link to post
Share on other sites

you can see the change on the test site. https://tbyb.co.uk/

Try this for the long display

.cc_message {
    margin-top: 0.5em;
    font-size: 1.2em;
    font-style: italic;
    font-family: Verdana;
}

or this for the floating box display

.cc-floating .cc-message {
    display: block;
    margin-bottom: 1em;
    font-size: 1.2em;
    font-style: italic;
    font-family: Verdana;
}

 


 

Share this post


Link to post
Share on other sites

V1.1 GDPR cookie widgets tabs.  

Has been updated to single header_tag add-on. This replaces the 4 original add-ons. You can simply set the position in this one add-on.

let’s you add a cookie widget to your site.  It is set for EU GDPR requirements so customer can refuse cookies. If you don't want this then don't use. You can chose 4 positions.

Top / Bottom bar or Left side / Right side floating box

Again totally standalone with no core code change. Once you have copied all the files over go into admin/Content /Modules/Header tags and install.

It uses the stock privacy.php to display statement. You can change the words displayed and change what is shown on links and buttons. The link to ocS privacy has to be edited in the file. The colours can also be changed in the same file.

/includes/modules/header_tags/ht_jcm_cookieconsent1.php

"palette": {
"popup": {
"background": "#eaf7f7", ***This changes background colour***
"text": "#5c7291" ***This changes text colour***
},
"button": {
"background": "#56cbdb", ***This changes background colour***
"text": "#ffffff" ***This changes text colour***
}
},
"theme": "edgeless",
"position": "top", ***These position options are top, bottom or bottom-right bottom-left ***
"type": "opt-out",
"content": {
"message": "This website uses cookies to ensure you have the best experience on our website.",
"dismiss": "Got it!",
"deny": "Refuse Cookies",
"link": "Learn More",
"href": "https://www.tbyb.co.uk/privacy.php"

Don't forget to put in your own website!

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

May be a silly question, but does this allow the customer to only dissallow some cookies like the tracking cookies, but will stall allow for other essential cookies, or does it just dissallow all cookies. Does it also show a list of the cookies being used.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

As the add-on say's

" Please note that these are display widgets only! They allow you to add code without needing to change core files. To block cookies you will need to add relavent code to the file. "

You can get more info on how to implament custom requirments here

https://cookieconsent.insites.com/documentation/javascript-api/


 

Share this post


Link to post
Share on other sites

V1.2 GDPR cookie widgets tabs.

Has been updated to single header_tag add-on with all settings edited in admin.

let’s you add a cookie widget to your site. These are all set for EU GDPR requirements so customer can refuse cookies. If you don't want this then don't use these. You can chose 4 positions.

Top / Bottom bar or bottom-left / bottom-right side floating box

Again totally standalone with no core code change. Once you have copied all the files over go into admin/Content /Modules/Header tags and install.

It uses the stock privacy.php to display statement. You can change the words displayed and change what is shown on links and buttons. The link to ocS privacy , the colours , text can all be changed in admin. You can also change from opt-in to opt-out.


 

Share this post


Link to post
Share on other sites

The big G shows- "This website uses cookies to ensure you have the best experience on our website. Learn More. Got it! " for the snippets in my newly indexed products search results.

Anyone know of a work around for this?

Thanks.

Share this post


Link to post
Share on other sites
34 minutes ago, Big Bear said:

Anyone know of a work around for this?

If you have content in your website then google should be using that not the cookies text 😂. This is my test site which is currently running the cookie script. As you can see google uses the content.

 

image.png.453056846a56e83c8c7d50ac62275335.png


 

Share this post


Link to post
Share on other sites

Background: At this since 2004, all products have content, old products currently correct, products added to catalog recently are getting indexed with: "This website uses cookies to ensure you have the best experience on our website. Learn More. Got it! "

Solution- module removed, requested url removals at G

Appreciation for your efforts- extreme.

Share this post


Link to post
Share on other sites

what version of osC are you using? Check to see in what place in html the script is being added. You may find its beeing added in your header so over riding other key words! the header tag is for osC CE only and should be beeing placed in the bottom (footer) of your html.


 

Share this post


Link to post
Share on other sites

Hello Zahid @JcMagpie,

Just to let you know that there exists another add-on since years which is based on the same script and it is multilanguage. The only difference is that the css and script is served locally, which makes it easier to customize the styles:

https://apps.oscommerce.com/FbzeO&europe-confidentialities-cookie-law

I would recommend you to check for already existing add-ons doing the same as yours before uploading duplicates. Maybe better spent time to improve existing ones instead to duplicate add-ons.

Also it would be good to consecuent make your add-ons multilanguage, OsCommerce is a multilanguage store!

I know and appreciate your effort to offer new contributions to the community, so please understand this as constructive suggestions.

best regards

Rainer

 

Edited by raiwa

Share this post


Link to post
Share on other sites

Once again @raiwa thankyou for your thoughtful advice, 

I simply make add-on's for my own use and post for other people to use if they chose to.

Nobody needs to use them as I'm sure there are better ones for all mine.

 

11 minutes ago, raiwa said:

add-ons multilanguage,

Simply don't have the time! Plus a few other users have kindly started to add lang files, but thanks for your feed back.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites
23 minutes ago, JcMagpie said:

Simply don't have the time! Plus a few other users have kindly started to add lang files, but thanks for your feed back.

Maybe publish less but better written contributions would be the way.

I do not refer to add additional language files, just english is enough as a base. But include multilanguage support in your coding. In this add-on the text definitions in the ht-module do not support multilanguage! and in others texts are hardcoded in english. Do what you wish, but don't make live hard to users!

Edited by raiwa

Share this post


Link to post
Share on other sites

What part of "I'm trying to give you hints how to improve your contributions" is not understood?

Edited by raiwa

Share this post


Link to post
Share on other sites

Using  single quote (apostrophe in: That's it) in any text definition, will break the module.

tep_db_input function should be used to fix it.

Meanwhile, multilanguage input example within the install function:

      include('includes/classes/language.php');
      $lng = new language;
      foreach($lng->catalog_languages as $key => $value) {
      	$key = strtoupper($value['directory']);
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Holiday Title " . $key . "', 'MODULE_CONTENT_HEADER_HOLIDAY_HEADER_" . $key . "', 'Holiday Title', 'Holiday Message Title for " . $key . " language.', '6', '7', 'tep_db_input', 'tep_cfg_module_textarea(', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Your Holiday Text " . $key . "', 'MODULE_CONTENT_HEADER_HOLIDAY_TEXT_" . $key . "', 'Place any message you want to here, you can use it for any type of notice not just holidays', 'Holiday Message Title for " . $key . " language.', '6', '8', 'tep_db_input', 'tep_cfg_module_textarea(', now())");
      }

and for the keys function:

    function keys() {
      include('includes/classes/language.php');
      $lng = new language;
      $KeysArray = array('MODULE_CONTENT_HEADER_HOLIDAY_STATUS', 'MODULE_CONTENT_HEADER_HOLIDAY_CONTENT_PAGES', 'MODULE_CONTENT_HEADER_HOLIDAY_CONTENT_WIDTH', 'MODULE_CONTENT_HEADER_HOLIDAY_CONTENT_ALIGN', 'MODULE_CONTENT_HEADER_HOLIDAY_SORT_ORDER', 'MODULE_CONTENT_HEADER_HOLIDAY_ORDER_MAIL');
      foreach($lng->catalog_languages as $key => $value) {
      	$key = strtoupper($value['directory']);
      	array_push($KeysArray, 'MODULE_CONTENT_HEADER_HOLIDAY_HEADER_' . $key);
      	array_push($KeysArray, 'MODULE_CONTENT_HEADER_HOLIDAY_TEXT_' . $key);
      }
      return $KeysArray;
    }
    

Then for the output:

    						<h3 class="panel-title">' .  constant('MODULE_CONTENT_HEADER_HOLIDAY_HEADER_' . strtoupper($language)) . '</h3>

 

Share this post


Link to post
Share on other sites

😊 Thank you @raiwa it's not that i don't know how to do it! it's just that I am lazy! this would almost double the lines of code in each addon and I simply don't have the time or the patience to do this. I hope you understand, I am semi retired and the last thing I need is more work. I will leave this to the professionals like you.

I will try to include this on updates if I have time but no promises.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×