Home › Forums › WoodMart support forum › Add To Cart – Function Not Working
Add To Cart – Function Not Working
- This topic has 18 replies, 2 voices, and was last updated 2 years, 11 months ago by Elise Noromit.
-
AuthorPosts
-
November 7, 2021 at 5:56 am #330019
[email protected]ParticipantHi 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/8Bdx3DJ57SENovember 7, 2021 at 10:06 am #330034
Elise NoromitMemberHello,
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 SVGIf the problem has gone, activate the plugins one by one, checking the issue to detect which one causes the problem.
Best Regards
November 7, 2021 at 10:28 pm #330096
[email protected]ParticipantHi Team,
I tried deactivating all the plugins (leaving the ones you had mentioned) but the issue still persists. Can you please advise?November 8, 2021 at 12:49 am #330101
Elise NoromitMemberHello,
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
November 8, 2021 at 1:21 am #330102
[email protected]ParticipantHi 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.
November 8, 2021 at 5:07 am #330104
[email protected]ParticipantHi Elise,
JUst wondering if you managed to find the route cause of the problem?
Kind Regards,
FatimahNovember 8, 2021 at 10:50 am #330191
[email protected]ParticipantHi 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
FatimahNovember 8, 2021 at 2:36 pm #330286
Elise NoromitMemberHello,
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
November 8, 2021 at 3:10 pm #330297
[email protected]ParticipantHi 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,
FatimahNovember 8, 2021 at 4:18 pm #330310
[email protected]ParticipantHi 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.
November 8, 2021 at 9:39 pm #330343
[email protected]ParticipantHi 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,
November 9, 2021 at 6:10 am #330382
[email protected]ParticipantHi 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
November 9, 2021 at 10:24 am #330439
Elise NoromitMemberHello,
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
November 10, 2021 at 11:38 am #330732
[email protected]ParticipantHey Elise,
The problem still seems to exist. I’ve added both the coding provided in the comment above.
Please advise.
Kind Regards,
FatimahNovember 11, 2021 at 11:15 am #331095
Elise NoromitMemberHello,
Please provide FTP access. You can insert the access into the Private content block below the message block.
Best Regards
November 12, 2021 at 12:32 am #331291
[email protected]ParticipantHi Elise,
Here are server details for your use:
November 12, 2021 at 11:14 am #331405
Elise NoromitMemberHello,
Please check the credentials I cannot log in: Connection timed out after 20 seconds of inactivity
Error: Could not connect to serverBest Regards
November 14, 2021 at 5:48 am #331661
[email protected]ParticipantHi Elise,
It looks like the issue has been resolved. Thank you so much for your help in this.November 14, 2021 at 6:35 pm #331750
Elise NoromitMemberYou are welcome! We are here to help.
Wish you a wonderful day!
-
AuthorPosts
The topic ‘Add To Cart – Function Not Working’ is closed to new replies.
- You must be logged in to create new topics. Login / Register