Support » Plugin: SMNTCS Quantity Increment Buttons for WooCommerce » [BUG] Max limit is ignored when using variations with stock

  • Resolved Dan Miller Coding

    (@danmillercoding)


    When using variations with stock management, the max limit of increase should be refreshed.
    On every change of variation, the limits should be updated.

    Variation selector - on change - call function render()

    OR better to get the max value with every click

    // Increase quantity.
    if ( add ) {
    	add.addEventListener( 'click', function() {
            max = element.querySelector( 'input.qty' ).getAttribute( 'max' );
            if ( max ) {
                var temp = parseInt( qty.value ) + parseInt( step );
    			if ( temp <= parseInt( max ) ) {
    				qty.value = temp;
    			}
    		} else {
    			qty.value = parseInt( qty.value ) + parseInt( step );
    		}
    		updateCartButton();
    	}, false );
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.