Jump to content

Enter quantity, press return, adds product to-cart. How to avoid?


c.matula@csm.at

Recommended Posts

You can put this code to the custom.js file to avoid that.

$(document).ready(function() {
$('#add-to-cart-or-refresh').on('keyup keypress', function(e) {
  var keyCode = e.keyCode || e.which;
  if (keyCode === 13) { 
    e.preventDefault();
    return false;
  }
});
});

Here is a free module which allows you to add custom css and javascript to your site without editing files. Prestashop 1.7 custom code module

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...