All things Shopify and commerce
URL: https://jsdqft-gs.myshopify.com/cart
Increase and decrease button is not clickable.
Solved! Go to the solution
This is an accepted solution.
Sorry!
Please use this updated code
<script>
document.addEventListener("DOMContentLoaded", function () {
// Select all buttons with the specific class
const buttons = document.querySelectorAll('button.quantity__button');
// Loop through the buttons and remove the 'disabled' attribute
buttons.forEach(button => {
if (button.hasAttribute('disabled')) {
button.removeAttribute('disabled');
}
});
});
</script>
<style>
button.quantity__button {
pointer-events: visible !important;
}
</style>
Is this FOC?
Yes, it is 🙂
Oh, and there’s something brewing behind the scenes that’s redefining customer experience. Curious? It’s time to Revize your store. Don’t say we didn’t warn you.
Hello @randytheasian ,
Edit theme.liquid search for </body>
Now here just before to it add this code
<script>
document.addEventListener("DOMContentLoaded", function () {
// Select all buttons with the specific class
const buttons = document.querySelectorAll('button.your-class');
// Loop through the buttons and remove the 'disabled' attribute
buttons.forEach(button => {
if (button.hasAttribute('disabled')) {
button.removeAttribute('disabled');
}
});
});
</script>
<style>
button.quantity__button {
pointer-events: visible !important;
}
</style>
Regards
Guleria
It didn't work
This is an accepted solution.
Sorry!
Please use this updated code
<script>
document.addEventListener("DOMContentLoaded", function () {
// Select all buttons with the specific class
const buttons = document.querySelectorAll('button.quantity__button');
// Loop through the buttons and remove the 'disabled' attribute
buttons.forEach(button => {
if (button.hasAttribute('disabled')) {
button.removeAttribute('disabled');
}
});
});
</script>
<style>
button.quantity__button {
pointer-events: visible !important;
}
</style>
Worked for 5 seconds, it stopped working
Please update the code with this one
<script>
document.addEventListener("DOMContentLoaded", function () {
setTimeout(() => {
// Select all buttons with the specific class
const buttons = document.querySelectorAll('button.quantity__button');
// Loop through the buttons and remove the 'disabled' attribute
buttons.forEach(button => {
if (button.hasAttribute('disabled')) {
button.removeAttribute('disabled');
}
});
}, 3000);
});
</script>
<style>
button.quantity__button {
pointer-events: visible !important;
}
</style>
btw I observe there is an app, I think booking one which disable the buttons.
You need to discuss the issue with them.
Regards
Guleria
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024