Merge pull request #5437 from claudiosmweb/feature-cart-qty-min-value
Define a min value to cart quantity input
This commit is contained in:
commit
a9b24c963e
|
@ -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' ); ?>
|
||||
|
|
Loading…
Reference in New Issue