Why isn't the second variant price updating on my website?

Osaid
Shopify Partner
1 0 0

i use this code to update price , 1st variant price is working fine but the 2nd variant price isnt updating . It's getting update price from 1st variant . here's the website , kindly check and help me ASAP 
https://www.revomadic.com/products/smart-cupping-massager-gp?variant=41744379248816

<script>
function change(value){
document.getElementById("count").value= 1*value;

// CODE FOR PRICE
var realPrice = window.localStorage.getItem('realPrice');
var comparePrice = window.localStorage.getItem('comparePrice');
var savePrice = window.localStorage.getItem('savePrice');
var currency = window.localStorage.getItem('currency');
document.querySelector("#ProductPrice .money").innerHTML= currency +(parseInt(realPrice)* parseInt(document.getElementById("count").value)).toLocaleString() + '.00';
document.querySelector("#ComparePrice .money").innerHTML= currency +(parseInt(comparePrice)* parseInt(document.getElementById("count").value)).toLocaleString() + '.00';
var elList = document.querySelectorAll(".number-discount_saved .money");
elList.forEach(el => el.innerHTML= currency +(parseInt(savePrice)* parseInt(document.getElementById("count").value)).toLocaleString() + '.00');



// END PRICE CODE
</script>

Replies 0 (0)