Home Forums WoodMart support forum Add To Cart – Function Not Working

Add To Cart – Function Not Working

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #330019

    Hi Team,

    Add to Cart
    We are having issues with our site. The Add To Cart button is taking too long to add products to the cart. Please see the Video in the link below.
    https://youtu.be/8Bdx3DJ57SE

    #330034

    Hello,

    Please deactivate all the plugins except these ones:

    Slider Revolution
    WPBakery Page Builder or Elementor
    Woodmart Core
    Contact Form 7
    MailChimp for WordPress
    WooCommerce
    Safe SVG

    If the problem has gone, activate the plugins one by one, checking the issue to detect which one causes the problem.

    Best Regards

    #330096

    Hi Team,
    I tried deactivating all the plugins (leaving the ones you had mentioned) but the issue still persists. Can you please advise?

    #330101

    Hello,

    Please, provide your site admin access (insert the site credentials into the Private content block under the message area) and confirm the permission for plugins deactivation, switching to the parent theme.

    Best Regards

    #330102

    Hi Elise,

    Here is the access to the site admin. I confirm that you have the permission to deactivate any plugin that is causing the problem. Please do let us know which plugin it is so that we can work on our end accordingly.

    #330104

    Hi Elise,
    JUst wondering if you managed to find the route cause of the problem?
    Kind Regards,
    Fatimah

    #330191

    Hi Elise, We have disabled the Ajax Add TO Cart as a temporary solution. When you check you need to activate it. You can activate it by login as an admin.

    Woocommerce->Settings->Products->Enable AJAX add to cart buttons on archives

    Once you activate it then you can replicate the issue that we are facing.

    Kind Regards
    Fatimah

    #330286

    Hello,

    I have checked the settings and I see no reason caused by WoodMart to make the add to cart slow.

    You have disabled AJAX shop and AJAX add to cart what makes the process longer and it requires the full reload of the page instead of updating part of the content.

    Please make the full backup of your site and check the issue on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by WooСommerce.

    Best Regards

    #330297

    Hi Elise,
    We have made a full back up of the site. We did check all the settings prior to getting in touch with you. We had no choice but to disable the Ajax as our site is badly affected due to the cause.

    Did you try activating the Ajax and testing the cause? We’ve checked from our end and were not able to detect the issue. We’re hoping you can help us in this.

    Kind Regards,
    Fatimah

    #330310

    Hi Elise,

    I notice that woodmart-child/woocommerce/cart/mini-cart.php version 3.7.0 is out of date. The core version is 5.2.0. Does this have anything to do with the issue? Would appreciate your reply.

    Also all the plugins are deactivated. I’m assuming you’re investigating the matter and therefore have left the site as it is (unfunctionable). I look forward to hearing from you.

    #330343

    Hi Elise,

    All the plugins on the site were left deactivated. This is a live site with customers visiting our site quite frequently. Please ensure that the site is not left unfunctional. If you need us to activate it back, let us know. Its detrimental that we leave the site functioning as much as possible.

    I look forward to your reply to my other comments above.

    Regards,

    #330382

    Hi Elise,

    Storefront theme has been installed here with all the content and products that we have.

    https://test.talesofindia.com.au/shop-indian-grocery-near-me/

    Please check how it adds the products to cart.

    Thank You

    #330439

    Hello,

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    add_filter( 'woocommerce_add_to_cart_fragments', 'woodmart_cart_data', 30 );
    function woodmart_cart_data( $array ) {
    	ob_start();
    	woodmart_cart_count();
    	$count = ob_get_clean();
    
    	ob_start();
    	woodmart_cart_subtotal();
    	$subtotal = ob_get_clean();
    
    	$array['span.wd-cart-number_wd']   = $count;
    	$array['span.wd-cart-subtotal_wd'] = $subtotal;
    
    	return $array;
    }

    and put the following code to the Custom JS in Theme Settings

    jQuery( document.body ).on( 'added_to_cart removed_from_cart', function( e, fragments ){
    	if ( fragments ) {
    			jQuery.each( fragments, function( key, value ) {
    				jQuery( key.replace('_wd','') ).replaceWith( value );
    			});
    
    			jQuery( document.body ).trigger( 'wc_fragments_loaded' );
    		}
    });

    Then clear your browser cache and check the add to cart speed.

    Kind Regards

    #330732

    Hey Elise,

    The problem still seems to exist. I’ve added both the coding provided in the comment above.

    Please advise.

    Kind Regards,
    Fatimah

    #331095

    Hello,

    Please provide FTP access. You can insert the access into the Private content block below the message block.

    Best Regards

    #331291

    Hi Elise,

    Here are server details for your use:

    #331405

    Hello,

    Please check the credentials I cannot log in: Connection timed out after 20 seconds of inactivity
    Error: Could not connect to server

    Best Regards

    #331661

    Hi Elise,
    It looks like the issue has been resolved. Thank you so much for your help in this.

    #331750

    You are welcome! We are here to help.

    Wish you a wonderful day!

Viewing 19 posts - 1 through 19 (of 19 total)

The topic ‘Add To Cart – Function Not Working’ is closed to new replies.