- This topic has 5 replies, 2 voices, and was last updated 1 year, 9 months ago by
David.
-
AuthorPosts
-
December 1, 2021 at 2:01 am #2032883
Juan Carlos Lopo
Hi everybody!
I’ve downloaded Generatepress and I’m very happy with the performance of this theme. The problem comes with WooCommerce cart fragments (cart-fragment.min.js) this piece of sh… that slow down my online store so much that it almost takes 5 seconds to load every page.
I know I should ask for help at WooCommerce support, but I’ve installed all kind of plugins (Perfmatters, W.Cart Fragments, Disable WooCommerce Bloat and many others) and nothing seems to work. Actually it seems there is some kind of compatibility issue between Generatepress and this plugins. I’ve even tried to modify functions.php with several code such as
add_action( ‘wp_enqueue_scripts’, ‘bladewp_disable_woocommerce_cart_fragments’, 11 );
function bladewp_disable_woocommerce_cart_fragments() {
wp_dequeue_script(‘wc-cart-fragments’);
}and other snippets about disabling cart AJAX but nothing seems to work!!!!!!!!!!
Is there any kind of compatibility issue about this solutions and Generatepress? Right now I’m losing money and potential customers, my bounce rate is rising and frankly this is driving me nuts!!!
I need to disable the damned Cart Fragments, no matter if I have to modify functions.php….
Does anybody have a clue about this?
Many many many thanks in advance!!!!
Juan
December 1, 2021 at 3:33 am #2032992David
StaffCustomer SupportHi there,
theres not any issues that i am aware of.
Things to check for:1. Ajax is disabled in Woocommerce > Settings > Products –> Add to cart behaviour
2. Menu cart is disabled in Customizer > Layout > Woocommerce.
3. Use the dequeue function with a higher priorty eg.add_action( 'wp_enqueue_scripts', 'bbloomer_disable_woocommerce_cart_fragments', 200 ); function bbloomer_disable_woocommerce_cart_fragments() { wp_dequeue_script( 'wc-cart-fragments' ); }
Reference site for the above snippet:
https://www.businessbloomer.com/woocommerce-why-how-to-disable-ajax-cart-fragments/
December 1, 2021 at 4:19 am #2033063Juan Carlos Lopo
Many thanks for your quick response David! But it still doesn’t work. I’ve disabled the Menu Cart and use an alternative cart (WP Menu Cart plugin). It works, but still it takes about 5 seconds to load every page. I need a menu cart anyway so I can not disable it unless I install an alternative one (that’s what I’ve done).
Any other idea?
Thank you again for your help!!!
Juan Lopo
December 1, 2021 at 4:59 am #2033117David
StaffCustomer SupportI only see the one site attached to your license.
When i inspect that site I do not see thecart-fragment.min.js
being loaded anywhere.So i am not sure that JS is the issue.
December 1, 2021 at 5:06 am #2033128Juan Carlos Lopo
Thanks David!!! https://bronzeymora.com/ … So I am probably wrong and maybe there is another process which is slowing down my website. Well, I’ll investigate it. Thanks for your wonderful support!!!
December 1, 2021 at 5:13 am #2033138David
StaffCustomer SupportThats correct. Hope you find the other issue!!
-
AuthorPosts
- You must be logged in to reply to this topic.