Is it possible to deactivate the 'Enter' key when adding items to cart? Only the 'ADD TO CART' button should add items to cart.
You have to add jquery to your product page,
jQuery(document).ready(function() { jQuery("#qty").keydown(function(event){ if(event.keyCode == 13) { event.preventDefault(); return false; } }); });
Thanks. Does this apply to Magento2.1 as my developer says Magnto 2.1 does not allow the deactivation of the enter key.
Thanks
That is Magento2.1 community version
Above code is working for all the Magento 2.* version. Its working fine for Magento 2.1 as well.
Now the developer says that this fix won't work because of customisation he has done. I doubt this is the case. The customisation done to the ordering process is to deactivate the add to cart button when an incorrect min order qty or multiples of qty is ordered for simple and grouped items