Jump to content

Steven 99

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Steven 99

  • Rank
    Newbie
  1. ========Problem solved ======= Thanks for your advice! I made sure to put id (or sku) before the numbers.... What I found out is that if you separate each script on a per page basis then it works! So I put this in functions.php of the WooCommerce backend: // price updates 2021 books <script> var element = document.getElementById("id440050").innerHTML = "€61,00"; var element = document.getElementById("id440039").innerHTML = "€42,00"; </script> // price updates 2021 toys <script> var element = document.getElementById("id440051").innerHTML = "
  2. ========Problem solved ======= What I found out is that if you separate each script on a per page basis then it works! So I put this in functions.php of the WooCommerce backend: // price updates 2021 books <script> var element = document.getElementById("id440050").innerHTML = "€61,00"; var element = document.getElementById("id440039").innerHTML = "€42,00"; </script> // price updates 2021 toys <script> var element = document.getElementById("id440051").innerHTML = "€91,00"; var element = document.getElementById("id440218").innerHTML = "€74,
  3. I found this JS snippet here on W3S when I was looking for a method to change prices (printed in HTML not as product attribute) in a WooCommerce store. document.getElementById("id01"); element.innerHTML = "New Heading"; I changed it to: document.getElementById("440050").innerHTML = "€61,00"; The way I assign the id to the HTML is: <strong id="440050">PRICE</strong> This worked - of course but every next script with another id I add doesn't work: === document.getElementById("440050").innerHTML = "€61,00"; document.getElementById("440039").innerHT
×
×
  • Create New...