Okay
  Public Ticket #1597033
Update Cart automatically
Closed

Comments

  • mnasra started the conversation

    Hello,

    i'm trying to get the cart updated automatically when the customer changes the quantity. I tried some code snippets i found on the Internet, but didnt work.

    /**
     * @snippet       Automatically Update Cart on Quantity Change - WooCommerce
     * @how-to        Watch tutorial @ https://businessbloomer.com/?p=19055
     * @sourcecode    https://businessbloomer.com/?p=73470
     * @author        Rodolfo Melogli
     * @compatible    Woo 3.4
     */
     
    add_action( 'wp_footer', 'bbloomer_cart_refresh_update_qty' ); 
     
    function bbloomer_cart_refresh_update_qty() { 
        if (is_cart()) { 
            ?> 
            <script type="text/javascript"> 
                jQuery('div.woocommerce').on('change', 'input.plusminus', function(){
                    console.log("Hello world!"); 
                    jQuery("[name='update_cart']").removeAttr("disabled");
                    jQuery("[name='update_cart']").trigger("click"); 
                }); 
            </script> 
            <?php 
        } 
    }-->
    

    My second problem is, that customers cannot remove products from cart on mobile, because the button is only visible on hover. 

  • [deleted] replied

    1— This is a customization question and support doesn't offer customization services as we wrote on our support homepage and on this area.

    If you're looking for professional help in this matter, there's always someone available for such tasks on the WP Kraken or Codeable. Pricing and timeline are always straightforward there and that's the main reason for recommending those services.

    2— Users have the option to remove the product from the cart in mobile version (see video).

    P.S: You are using an old version of our theme 4.9.6, the latest version for the moment is 5.0.1 (read changelog), please update your theme first and then the premium plugins too. 

    The easiest way to update your theme is if you use Envato Market plugin (screenshot). When you connect Envato Market plugin you will see theme update prompt on the Updates tab of your Wordpress site.

    After you update the theme, there is a chance that we also updated some of the plugins that we offer. To update those plugins to the latest version that we support, just go to Appearance > Install Plugins.

    Thanks!