woocommerce - initial quantity for product variations -


i found code allows me set initial quantity simple products: http://docs.woothemes.com/document/adjust-the-quantity-input-values/

it leaves me freedom reduce quantity. (eg. initial quantity = 5 , reduce 3)

but products variations possible set minimum quantity, not initial quantity. unfortunately not possible reduce items.

i've tried find solution set initial quantity product variation, there seems not one.

does have solution this?

if want set initial amount 5 , users allowed reduce or increase per requirement need set input value desired one.

add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); function jk_woocommerce_quantity_input_args( $args, $product ) {     $args['input_value']    = 5;    // desired value     return $args; } 

update

by default not allowed so. if insist can make work around. beware, might hurt.

if theme has copy of woocommerce template files (generally in folder named woocommerce in root of template directory). navigate [your-theme-directory]/woocommerce/global/quantity-input.php file , search qty class in number input field. remove it.

again warn functionality depends on class, can see in add-to-cart-variations.js file in plugins assets/js folder. need prepared that.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -