Merge pull request #5437 from claudiosmweb/feature-cart-qty-min-value

Define a min value to cart quantity input
This commit is contained in:
Mike Jolley 2014-05-07 13:12:04 +01:00
commit a9b24c963e
1 changed files with 2 additions and 1 deletions

View File

@ -90,6 +90,7 @@ do_action( 'woocommerce_before_cart' ); ?>
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'],
'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(),
'min_value' => '0'
), $_product, false );
}
@ -148,4 +149,4 @@ do_action( 'woocommerce_before_cart' ); ?>
</div>
<?php do_action( 'woocommerce_after_cart' ); ?>
<?php do_action( 'woocommerce_after_cart' ); ?>