Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    It’s old but may work – you need code or template overrides either way. https://gerhardpotgieter.com/2013/09/09/woocommerce-product-quantity-dropdown/

    Thread Starter luckypacket

    (@luckypacket)

    thnk you

    I was using the provided code in combination with the following code (found it here: https://gist.github.com/mikaelz/f41e29c6a99a595602e4) to auto update the cart after quantity changed and it worked well until woocommerce version 3.0. But with woocommerce 3.0.X, it works only for every second update. So if I change the quantity, it does not update. If I change it again, it does update. Any idea how to fix this? Many thanks!

    add_action( 'wp_footer', 'cart_update_qty_script' );
    function cart_update_qty_script() {
    if (is_cart()) :
    ?>
    <script>
    jQuery('div.woocommerce').on('change', '.qty', function(){
    jQuery("[name='update_cart']").removeAttr('disabled');
    jQuery("[name='update_cart']").trigger("click");
    });
    </script>
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘input quantity next to product’ is closed to new replies.