defined a min value to cart quantity input

This commit is contained in:
claudiosmweb 2014-05-06 21:49:30 -03:00 committed by Mike Jolley
parent fcfaff1954
commit 1f12370fc4
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_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'], 'input_value' => $cart_item['quantity'],
'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(), 'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(),
'min_value' => '0'
), $_product, false ); ), $_product, false );
} }
@ -148,4 +149,4 @@ do_action( 'woocommerce_before_cart' ); ?>
</div> </div>
<?php do_action( 'woocommerce_after_cart' ); ?> <?php do_action( 'woocommerce_after_cart' ); ?>