function fieldQuantityHandler(evt) {
    var variantId = parseInt($(this).closest('.cart-item').attr('data-variant-id'), 10);
    var variant = product.variants.filter(function (variant) {
      return (variant.id === variantId);
    })[0];
    var cartLineItem = findCartItemByVariantId(variant.id);
    var quantity = evt.target.value;
    if (cartLineItem) {
      updateVariantInCart(cartLineItem, quantity);
    }
  }
/* Update product variant quantity in cart through input field
  ============================================================ */
Update product variant quantity in cart through input field
Update product variant quantity in cart through input field
function fieldQuantityHandler(evt) {
    var variantId = parseInt($(this).closest('.cart-item').attr('data-variant-id'), 10);
    var variant = product.variants.filter(function (variant) {
      return (variant.id === variantId);
    })[0];
    var cartLineItem = findCartItemByVariantId(variant.id);
    var quantity = evt.target.value;
    if (cartLineItem) {
      updateVariantInCart(cartLineItem, quantity);
    }
  }
function fieldQuantityHandler ( evt ) { var variantId = parseInt ( $ ( this ) . closest ( '.cart-item' ) . attr ( 'data-variant-id' ) , 10 ) ; var variant = product . variants . filter ( function ( variant ) { return ( variant . id === variantId ) ; } ) [ 0 ] ; var cartLineItem = findCartItemByVariantId ( variant . id ) ; var quantity = evt . target . value ; if ( cartLineItem ) { updateVariantInCart ( cartLineItem , quantity ) ; } }
Update product variant quantity in cart through input field
Update product variant quantity in cart through input field