Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you want to show on increase or decrease the quantity of items than use this function

    function remove_disable_updatecart() {
    ?>
    <script type=’text/javascript’>
    jQuery(document).ready(function() {
    jQuery( ‘.shop_table.cart’ ).closest( ‘form’ ).find( ‘input[name=”update_cart”]’ ).removeProp( ‘disabled’);
    });
    </script>
    <script type=”text/javascript”>
    jQuery(document).on(“click”,”.reduced.items-count”,function () {
    jQuery( ‘.shop_table.cart’ ).closest( ‘form’ ).find( ‘input[name=”update_cart”]’ ).removeProp( ‘disabled’);
    });
    jQuery(document).on(“click”,”.increase.items-count”,function () {
    jQuery( ‘.shop_table.cart’ ).closest( ‘form’ ).find( ‘input[name=”update_cart”]’ ).removeProp( ‘disabled’);
    });
    </script>
    <?php
    }
    add_action( ‘wp_footer’, ‘remove_disable_updatecart’, 99 );
    ?>

    and please make sure the <?php ?> tags are right otherwise its not working

    Hi @nangthaint88

    Here is the function for help you
    function remove_disable_updatecart() {
    ?>
    <script type=’text/javascript’>
    jQuery(document).ready(function() {
    jQuery( ‘.shop_table.cart’ ).closest( ‘form’ ).find( ‘input[name=”update_cart”]’ ).removeProp( ‘disabled’);
    });
    </script>

    <?php
    }
    add_action( ‘wp_footer’, ‘remove_disable_updatecart’, 99 );
    ?>

    Add this function to function.php

Viewing 2 replies - 1 through 2 (of 2 total)