Skip to content

Commit

Permalink
Merge pull request #96 from v4lux/fix/js-error
Browse files Browse the repository at this point in the history
Use vanilla JS to avoid issues because of jquery versions
  • Loading branch information
matks authored Sep 21, 2020
2 parents 6ff7638 + 5bfaf9c commit 1a7ccd5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions views/js/overrideAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
* International Registered Trademark & Property of PrestaShop SA
*/

$(window).load(function() {
let addressShipping = $('#addressShipping');
addressShipping.empty();
addressShipping.append('<p>'+psgdprNoAddresses+'</p>');
addressShipping.css("visibility", "visible");

let addressInvoice = $('#addressInvoice');
addressInvoice.empty();
addressInvoice.append('<p>'+psgdprNoAddresses+'</p>');
addressInvoice.css("visibility", "visible");
document.addEventListener('DOMContentLoaded', function() {
let addressShipping = document.getElementById('addressShipping');
if (addressShipping) {
addressShipping.innerHTML = '<p>'+psgdprNoAddresses+'</p>';
addressShipping.style.visibility = "visible";
}

let addressInvoice = document.getElementById('addressInvoice');
if (addressInvoice) {
addressInvoice.innerHTML = '<p>'+psgdprNoAddresses+'</p>';
addressInvoice.style.visibility = "visible";
}
});

0 comments on commit 1a7ccd5

Please sign in to comment.