function edgtfInitQuantityButtons() {
		$(document).on('click', '.edgtf-quantity-minus, .edgtf-quantity-plus', function (e) {
			e.stopPropagation();
			
			var button = $(this),
				inputField = button.siblings('.edgtf-quantity-input'),
				step = parseFloat(inputField.data('step')),
				max = parseFloat(inputField.data('max')),
				minus = false,
				inputValue = parseFloat(inputField.val()),
				newInputValue;
			
			if (button.hasClass('edgtf-quantity-minus')) {
				minus = true;
			}
			
			if (minus) {
				newInputValue = inputValue - step;
				if (newInputValue >= 1) {
					inputField.val(newInputValue);
				} else {
					inputField.val(0);
				}
			} else {
				newInputValue = inputValue + step;
				if (max === undefined) {
					inputField.val(newInputValue);
				} else {
					if (newInputValue >= max) {
						inputField.val(max);
					} else {
						inputField.val(newInputValue);
					}
				}
			}
			
			inputField.trigger('change');
		});
	}
/*
    ** Init quantity buttons to increase/decrease products for cart
    */
Init quantity buttons to increase/decrease products for cart
Init quantity buttons to increase / decrease products for cart
function edgtfInitQuantityButtons() {
		$(document).on('click', '.edgtf-quantity-minus, .edgtf-quantity-plus', function (e) {
			e.stopPropagation();
			var button = $(this),
				inputField = button.siblings('.edgtf-quantity-input'),
				step = parseFloat(inputField.data('step')),
				max = parseFloat(inputField.data('max')),
				minus = false,
				inputValue = parseFloat(inputField.val()),
				newInputValue;
			if (button.hasClass('edgtf-quantity-minus')) {
				minus = true;
			}
			if (minus) {
				newInputValue = inputValue - step;
				if (newInputValue >= 1) {
					inputField.val(newInputValue);
				} else {
					inputField.val(0);
				}
			} else {
				newInputValue = inputValue + step;
				if (max === undefined) {
					inputField.val(newInputValue);
				} else {
					if (newInputValue >= max) {
						inputField.val(max);
					} else {
						inputField.val(newInputValue);
					}
				}
			}
			inputField.trigger('change');
		});
	}
function edgtfInitQuantityButtons ( ) { $ ( document ) . on ( 'click' , '.edgtf-quantity-minus, .edgtf-quantity-plus' , function ( e ) { e . stopPropagation ( ) ; var button = $ ( this ) , inputField = button . siblings ( '.edgtf-quantity-input' ) , step = parseFloat ( inputField . data ( 'step' ) ) , max = parseFloat ( inputField . data ( 'max' ) ) , minus = false , inputValue = parseFloat ( inputField . val ( ) ) , newInputValue ; if ( button . hasClass ( 'edgtf-quantity-minus' ) ) { minus = true ; } if ( minus ) { newInputValue = inputValue - step ; if ( newInputValue >= 1 ) { inputField . val ( newInputValue ) ; } else { inputField . val ( 0 ) ; } } else { newInputValue = inputValue + step ; if ( max === undefined ) { inputField . val ( newInputValue ) ; } else { if ( newInputValue >= max ) { inputField . val ( max ) ; } else { inputField . val ( newInputValue ) ; } } } inputField . trigger ( 'change' ) ; } ) ; }
Init quantity buttons to increase/decrease products for cart
Init quantity buttons to increase / decrease products for cart