Quote from: AH on September 03, 2024, 19:01:34 PMPlease show what you are doing rather than just saying "its a bug"
Is it code or template overrides you are working on?
<script>
document.addEventListener("DOMContentLoaded", () => {
const addToCartButton = document.querySelector('.addtocart-button');
const allRadioButtons = document.querySelectorAll('.cvselection');
const selectedRadioButton = document.querySelector('.cvselection:checked');
if (selectedRadioButton && selectedRadioButton.value === 'VM_CUSTOM_NOT_SELECTED') {
addToCartButton.disabled = true;
} else {
addToCartButton.disabled = false;
}
allRadioButtons.forEach(radioButton => {
radioButton.addEventListener('change', () => {
if (radioButton.value === 'VM_CUSTOM_NOT_SELECTED') {
addToCartButton.disabled = true;
} else {
addToCartButton.disabled = false;
}
});
});
});
</script>
<script>
document.addEventListener("DOMContentLoaded", () => {
const addToCartButton = document.querySelector('.addtocart-button');
const allRadioButtons = document.querySelectorAll('.cvselection');
addToCartButton.disabled = true;
allRadioButtons.forEach(radioButton => {
radioButton.addEventListener('change', () => {
if (radioButton.value !== 'VM_CUSTOM_NOT_SELECTED') {
addToCartButton.disabled = false;
}
});
});
});
</script>
Page created in 0.114 seconds with 13 queries.