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"; + } });