little Compatibility issue with dropdown menu
-
Hi Moiseh,
Its really a great work you keep doing man & we really appreciate that .. you always stand by our side to make your plugin compatible with every solution.
We had an issue today with the dropdown menu option, it doesn’t happen when dropdown is disabled in your plugin and work with the +/- option, but with the dropdown option activated instead of the +/- the issue happens:
Our setup that we use your plugin with activating the dropdown without the +/- option and max input value is 10.
We use the snippet below to limit some products only by their slut to have a specific qualities where is the max is 10 too but we need the drop down to have 5,10 only in that case.
add_filter( 'woocommerce_quantity_input_args', 'ts_woocommerce_quantity_selected_number', 10, 2 ); function ts_woocommerce_quantity_selected_number( $args, $product ) { // global $product; if ( ! is_cart() ) { if ($product->get_slug()=="group-ticket"){ $args['input_value'] = 5; // Start from this value (default = 1) $args['max_value'] = 10; // Maximum quantity (default = -1) $args['min_value'] = 5; // Minimum quantity (default = 0) $args['step'] = 5; // Increment or decrement by this value (default = 1) } } else { if ($product->get_slug()=="group-ticket"){ // Cart's 'min_value' is 0 $args['max_value'] = 10; $args['step'] = 5; $args['min_value'] = 5; } } return $args; }
It works fine with the +/- option in your plugin if we disabled the dropdown menu, so how can we make it work too with the dropdown instead of the +/- and when this specific product so the dropdown will have the 5,10 quantities only.
Thank you so much for the great work
Stay Safe for you & your family
Best Regards
- The topic ‘little Compatibility issue with dropdown menu’ is closed to new replies.