If quantity(qty) is greater then 1 so this green update button show otherwise disable. How can I do this in Magento 2?
-
08-03-2021 - |
La solution
use simple jQuery code on Click event of Up-Down arrow to make it work.
<script>
var qty = jQuery('#qty').val();
if(qty > 0){
jQuery("#product-addtocart-button").attr("disabled", true);
}else{
jQuery("#product-addtocart-button").attr("disabled", false);
}
</script>
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange