Lilian Domin

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Bug on decimal quantities #104155
    Lilian Domin
    Participant

    Hey Omar,

    thanks for you’re help, but I fixed it. But 2. is still a problem.

    Thanks

    in reply to: Bug on decimal quantities #104154
    Lilian Domin
    Participant
    in reply to: Bug on decimal quantities #104153
    Lilian Domin
    Participant

    Hello Omar,

    It works finde with the keyboard arrows. Okay, then it seems to be an error in the theme JS. I already changed it, because it does only parse integers. But my JS is not the best and it doesn’t work with mobile chorme (mobile firefox works fine). Maybe someone can help me:

    productQuantityAdjust: function() {
    			// Increase
    			jQuery(document).on('click', '.qty-plus', function(e) {
    				e.preventDefault();
    				var quantityInput = jQuery(this).parents('.quantity').find('input.qty'),
    					step = parseFloat(quantityInput.attr('step'), 10),
    					newValue = parseFloat(quantityInput.val(), 10) + step,
    					maxValue = parseFloat(quantityInput.attr('max'), 10);
    
    				if (!maxValue) {
    					maxValue = 9999999999;
    				}
    
    				if ( newValue = minValue ) {
    					quantityInput.val(newValue);
    					quantityInput.change();
    				}
    			});
    		}
Viewing 3 posts - 1 through 3 (of 3 total)