When I am trying to ‘add to cart’, initially it works well, however, when I go and select a variant then suddenly the add to cart button becomes unclickable, whereas in the beginning before changing for a variant is working well. Any ideas why that is happening? Take this product for example: https://mastorascy.myshopify.com/products/garden-claw-gloves
Hello, thanks for the reply. However, if I remove that part of the code, the problem is that the variants are not dynamic anymore, meaning that byc chaning the variant, then the price doesn’t change and neither does the image which represents that variant.
Do you have any other suggestions?
Thanks:)
Hello again!
Actually by you saying that I changed something in the global.js file you poked my memory and I remembered that I did change something there a very long time ago.
I changed the code of '‘innerHTML inside the price block (“destination” variable) to new price (“source” variable)’
with the following code “if (source && destination) { destination.innerHTML = source.innerHTML; document.getElementById(‘my-price’).innerHTML = source.innerHTML; }”,
when I was trying to create my own new price block, and I think this line “document.getElementById(‘my-price’).innerHTML = source.innerHTML;” was messing up the whole add to acart button. I removed it now, and it works perfectly again. Thanks for helping me remember that change in the global.js file!