♥JcMagpie Posted May 25, 2018 Share Posted May 25, 2018 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/ Left and Right widgets. Link to comment Share on other sites More sharing options...
inra311 Posted May 25, 2018 Share Posted May 25, 2018 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!? Link to comment Share on other sites More sharing options...
♥JcMagpie Posted May 25, 2018 Author Share Posted May 25, 2018 I simply make available what I make for my sites, so if anyone else can use it they are free to do so. Link to comment Share on other sites More sharing options...
puddlec Posted May 25, 2018 Share Posted May 25, 2018 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. Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
♥JcMagpie Posted May 25, 2018 Author Share Posted May 25, 2018 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 } }, Link to comment Share on other sites More sharing options...
♥JcMagpie Posted May 25, 2018 Author Share Posted May 25, 2018 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 Link to comment Share on other sites More sharing options...
♥JcMagpie Posted May 25, 2018 Author Share Posted May 25, 2018 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” Link to comment Share on other sites More sharing options...
davinci8 Posted November 15, 2018 Share Posted November 15, 2018 Hi Zahid, The popup works fine. Is it possible to change the font? Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 16, 2018 Author Share Posted November 16, 2018 been a long time since I looked at this, but i'm sure a simple bit of css will do that for you. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 16, 2018 Author Share Posted November 16, 2018 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; } Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 16, 2018 Author Share Posted November 16, 2018 V1.1 GDPR cookie widgets tabs. GDPR Cookie Widgets V1.1 CE 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! Link to comment Share on other sites More sharing options...
♥14steve14 Posted November 16, 2018 Share Posted November 16, 2018 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 Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 16, 2018 Author Share Posted November 16, 2018 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/ Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 18, 2018 Author Share Posted November 18, 2018 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. Link to comment Share on other sites More sharing options...
Guest Posted November 21, 2018 Share Posted November 21, 2018 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. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 21, 2018 Author Share Posted November 21, 2018 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. Link to comment Share on other sites More sharing options...
Guest Posted November 21, 2018 Share Posted November 21, 2018 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. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 21, 2018 Author Share Posted November 21, 2018 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. Link to comment Share on other sites More sharing options...
♥raiwa Posted December 14, 2018 Share Posted December 14, 2018 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 About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 14, 2018 Author Share Posted December 14, 2018 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. Link to comment Share on other sites More sharing options...
♥raiwa Posted December 14, 2018 Share Posted December 14, 2018 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! About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted December 14, 2018 Share Posted December 14, 2018 What part of "I'm trying to give you hints how to improve your contributions" is not understood? About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 14, 2018 Author Share Posted December 14, 2018 27 minutes ago, raiwa said: Maybe publish less but better written contributions would be the way. Thank you @raiwa I will take your comments into consideration. Link to comment Share on other sites More sharing options...
♥raiwa Posted December 15, 2018 Share Posted December 15, 2018 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> About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 15, 2018 Author Share Posted December 15, 2018 😊 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.