Answer the question
In order to leave comments, you need to log in
Why does the script count the number of products through one?
Good day!
There is an online store magazin.molecularmeal.ru/
On any product page, for example magazin.molecularmeal.ru/nabor-tekstur-po-molekuljarnoj-kuhne, if you click on the "plus" in the quantity of the product, then the quantity is added after one, just the same and diminishes.
The same thing happens if you enter the quantity manually and try to increase or decrease.
In the script file (/catalog/view/javascript/common.js) the addition looks like this:
$(".quantity-adder .add-action").click(function(){
if($(this).hasClass('add-up')){
$("[name=quantity]",'.quantity-adder').val(parseInt($("[name=quantity]",'.quantity-adder').val())+1);
} else {
if(parseInt($("[name=quantity]",'.quantity-adder').val())>1){
$("input",'.quantity-adder').val(parseInt($("[name=quantity]",'.quantity-adder').val())-1);
}
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question