Home › Forums › WoodMart support forum › Add to Card is too slow
Add to Card is too slow
- This topic has 7 replies, 2 voices, and was last updated 3 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
August 29, 2021 at 8:21 pm #315241
tohamaParticipantAdd an item to Cart is taking over 15 seconds , i just installed my theme
August 29, 2021 at 11:40 pm #315262
tohamaParticipantThe Default Demo theme after installation has i bug you can see it in the photos i left here ,
can i give an access to the Admin Panel and get al these fixedAttachments:
You must be logged in to view attached files.August 30, 2021 at 6:12 am #315281
Artem TemosKeymasterHello,
Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand is it our theme issue or not?
Regards
August 30, 2021 at 2:04 pm #315458
tohamaParticipantI tried a different theme and it is a little bit faster ,
what can i do now ?August 30, 2021 at 2:09 pm #315461
Artem TemosKeymasterCould you please disable these plugins on your server temporarily https://gyazo.com/86cd4ad9a92a24e7f451c0b7a57a778b ?
Also, send us your FTP access.August 30, 2021 at 4:00 pm #315482
tohamaParticipantI didnt install those plugins at all from the begin (SSO and Enhanced Page Cache ).
August 31, 2021 at 12:02 am #315541
tohamaParticipantAlso the Site Speed on Develper.google.come
36 on mobile
49 on desktop
this is not acceptable at all , the theme description Says that the theme is optimized for google page speed , I see No PerformanceAttachments:
You must be logged in to view attached files.August 31, 2021 at 9:26 am #315614
Artem TemosKeymasterTry 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.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register