From 555bfbd049f0af827fc5cac10c816201e8279aad Mon Sep 17 00:00:00 2001 From: matks Date: Mon, 20 Jul 2020 10:35:30 +0200 Subject: [PATCH 1/5] Add dependabot config file --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..e1818d46 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 10 + target-branch: dev +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 10 + target-branch: dev From f43c6cc0509940f4914cde6fc12f76804cd6d461 Mon Sep 17 00:00:00 2001 From: v4lux Date: Fri, 7 Aug 2020 10:03:58 +0200 Subject: [PATCH 2/5] Avoid to hide invoice and delivery address on 1.7.7 --- psgdpr.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/psgdpr.php b/psgdpr.php index d20cc8a1..17649e11 100755 --- a/psgdpr.php +++ b/psgdpr.php @@ -499,6 +499,10 @@ public function submitDataConsent() */ public function hookActionAdminControllerSetMedia() { + if ((bool) version_compare(_PS_VERSION_, '1.7.7', '>=')) { + return false; + } + $controller = Dispatcher::getInstance()->getController(); if ($controller !== 'AdminOrders') { From 645a04b05ea8fa8d2cb9baae40f20e9ffbaa2f95 Mon Sep 17 00:00:00 2001 From: v4lux Date: Fri, 7 Aug 2020 11:28:22 +0200 Subject: [PATCH 3/5] Remove exclude condition for 1.7.7 fix has been made on PrestaShop side in order to add selectors --- psgdpr.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/psgdpr.php b/psgdpr.php index 17649e11..d20cc8a1 100755 --- a/psgdpr.php +++ b/psgdpr.php @@ -499,10 +499,6 @@ public function submitDataConsent() */ public function hookActionAdminControllerSetMedia() { - if ((bool) version_compare(_PS_VERSION_, '1.7.7', '>=')) { - return false; - } - $controller = Dispatcher::getInstance()->getController(); if ($controller !== 'AdminOrders') { From 5bfaf9c673c313b3ddc6c06e6b57d154e8c30b4c Mon Sep 17 00:00:00 2001 From: v4lux Date: Fri, 7 Aug 2020 11:30:50 +0200 Subject: [PATCH 4/5] Replace jquery by vanilla js to avoid any jquery version issues --- views/js/overrideAddress.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/views/js/overrideAddress.js b/views/js/overrideAddress.js index 5472296d..2e8fe914 100755 --- a/views/js/overrideAddress.js +++ b/views/js/overrideAddress.js @@ -17,14 +17,16 @@ * International Registered Trademark & Property of PrestaShop SA */ -$(window).load(function() { - let addressShipping = $('#addressShipping'); - addressShipping.empty(); - addressShipping.append('

'+psgdprNoAddresses+'

'); - addressShipping.css("visibility", "visible"); - - let addressInvoice = $('#addressInvoice'); - addressInvoice.empty(); - addressInvoice.append('

'+psgdprNoAddresses+'

'); - addressInvoice.css("visibility", "visible"); +document.addEventListener('DOMContentLoaded', function() { + let addressShipping = document.getElementById('addressShipping'); + if (addressShipping) { + addressShipping.innerHTML = '

'+psgdprNoAddresses+'

'; + addressShipping.style.visibility = "visible"; + } + + let addressInvoice = document.getElementById('addressInvoice'); + if (addressInvoice) { + addressInvoice.innerHTML = '

'+psgdprNoAddresses+'

'; + addressInvoice.style.visibility = "visible"; + } }); From 152de3923f0fcbd268a9e91ec3b47a3223ce373e Mon Sep 17 00:00:00 2001 From: matks Date: Mon, 21 Sep 2020 17:46:58 +0200 Subject: [PATCH 5/5] Bump to 1.2.1 --- psgdpr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psgdpr.php b/psgdpr.php index d20cc8a1..3b850e7d 100755 --- a/psgdpr.php +++ b/psgdpr.php @@ -119,7 +119,7 @@ public function __construct() // Settings $this->name = 'psgdpr'; $this->tab = 'administration'; - $this->version = '1.2.0'; + $this->version = '1.2.1'; $this->author = 'PrestaShop'; $this->need_instance = 0;