theDoris Posted October 9, 2017 Share Posted October 9, 2017 W wersji 1.6 aby po przyciśnięciu plusa dodawało nie jeden a np. 2 produkty trzeba było edytować product.js i ten kawałek kodu // 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(); }); Może mi ktoś napisać jaki kod odpowiada za to w wersji 1.7 ? Link to comment Share on other sites More sharing options...
Question
theDoris
W wersji 1.6 aby po przyciśnięciu plusa dodawało nie jeden a np. 2 produkty trzeba było edytować product.js i ten kawałek kodu
// 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(); });
Może mi ktoś napisać jaki kod odpowiada za to w wersji 1.7 ?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now