Jump to content

PS 1.7 product increment button


theDoris

Recommended Posts

Hi, in v 1.6 when I want in everytime on click + button add for example 2 product I had to change in product.js this part of code

 

// The button to increment the product value $(document).on('click', '.product_quantity_up', function(e){ e.preventDefault(); fieldName = $(this).data('field-qty'); var currentVal = parseInt($('input[name=+fieldName+]').val()); if (!allowBuyWhenOutOfStock && quantityAvailable > 0) quantityAvailableT = quantityAvailable; else quantityAvailableT = 100000000; if (!isNaN(currentVal) && currentVal < quantityAvailableT) $('input[name=+fieldName+]').val(currentVal + 1).trigger('keyup'); else $('input[name=+fieldName+]').val(quantityAvailableT); $('#quantity_wanted').change(); });

 

What part of code I had to edit in 1.7 ?

Link to comment
Share on other sites

  • 1 year later...

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...