Support » Plugin: WooCommerce » Cart Quantity is not updating

  • Resolved shoaib fareed

    (@shoaib-fareed)


    I have moved the website to live server some days ago now while testing the things i have just found that the quantity input is not updating the number of product at all,

    I have checked the console errors but there is not any related to this error and also checked the things by disabling the other plugins and with the default theme as well but no luck

    Is there anyone else faced the same issue please help me out.

    here is the video screenshot: https://www.screencast.com/t/QEtZunA9

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter shoaib fareed

    (@shoaib-fareed)

    Ok, I have solved the issue in my case there was another function to restrict the cart to only hold 99 products at a time as follows:

    function only_nintynine_items_allowed_cart_update( $passed, $cart_item_key, $values, $updated_quantity ) {
    
    	$cart_items_count = WC()->cart->get_cart_contents_count();
    	$original_quantity = $values['quantity'];
    	$total_count = $cart_items_count - $original_quantity + $updated_quantity;
    
    	if( $cart_items_count > 99 || $total_count > 99 ){
            // Set to false
    		$passed = false;
            // Display a message
    		wc_add_notice( __( "Sie können nicht mehr als 99 Artikel im Warenkorb haben.", "woocommerce" ), "error" );
    	}
    	return $passed;
    }

    I have resolved the conflict so the cart is working fine now.

Viewing 1 replies (of 1 total)
  • The topic ‘Cart Quantity is not updating’ is closed to new replies.