Home › Forums › WoodMart support forum › Ajax Add to cart button is slow
Ajax Add to cart button is slow
- This topic has 11 replies, 3 voices, and was last updated 5 years, 2 months ago by newsprince.
-
AuthorPosts
-
September 26, 2019 at 10:54 am #146783
luan0409ParticipantAnyway to increase the speed?
The speed on your demo site: https://prnt.sc/pb7b05
My site even worse everytime i install any new plugins relate to Woocommerce
My server is strong as hell too: 16 vCore, 65 Ram
If i click add to cart continously then it’s ok at 500ms,
Your demo site:
https://prnt.sc/pb7qe2
https://prnt.sc/pb7qp5My site:
https://prnt.sc/pb7rqa
https://prnt.sc/pb7t0abut if i take a break to read the product description. After like 1 or 2 minute, then i click on the ADD TO CART button again, it start to do DNS lookup + TTFP even higher like double, which took 1s, 2s to add to cart finish, sometime it took like forever to add to cart with AJAX, spinning like forever.
Mysite, the FFTP is not much maybe becuz the Server is strong with 65Ram and 16 vcore but still has a problem with DNS:
https://prnt.sc/pb7oo3
https://prnt.sc/pb7u2qYour site is better cus it doesn’t have the DNS lookup problem but still TTFP and something else got Higher than 500s, like double, so worse than my website:
https://prnt.sc/pb7uuk
https://prnt.sc/pb7vncThe thing is if internet is slow, my customer will lost patient and exit website.
Your demo site is fine since you dont have to install many Woocommerce plugins but my website need to install a lot to do stuff to collect data and shipping.
I saw some Magento site they do Ajax add to cart button too but the speed is insanely Fast, like Instantly ADD TO CART.
So is there anyway to improve this?
I tried HeartBeat, install all the Cache plugins, from litespeed to WP rocket but no hope.
They only speed up JS and CSS file and loading page speed but this crazy AJAX add to cart PHP thing will stay the same even though i test it on a STRONG AF VPS, but still does not matter.
September 26, 2019 at 11:33 am #146793
Artem TemosKeymasterHello,
We don’t see a problem from our theme side in this situation. The speed is quite fast (~500ms) in general case. As for the DNS lookup, it is more related to some problems on the server side since it doesn’t depend on the theme. Try to ask your hosting provider help to investigate why it happens.
Kind Regards
September 26, 2019 at 12:16 pm #146805
luan0409ParticipantJesus, thanks for the long answer which does not help anything.
Just like you didn’t read anything from my question again like the previous TOPIC:
Report the bug => you reponse with “nothing wrong” => try to convince and explain with 5 long ass replies and finally a manager come out and admit it is a bug and fix it with an update. Now it’s you again, the irresponsible supporter.
Try to add some woocommerce plugins and see if it load fast anymore, what the point of “QUITE FAST” when your website does not add anything in it.
“As for the DNS lookup, it is more related to some problems on the server side”.
Really? Server again, it’s a fresh VPS, 65RAM and 16 vcore with just plain wordpress, what’s wrong with my server anyway?
Nothing wrong with your theme? Your server? then what is this? Read what i said above about taking a break 1 to 2 minutes … and then click at the ADD TO CART button again
Look at your demo, do you even understand English?
https://prnt.sc/pb92i0 ===> Your OFFICIAL demo ok? Not mine.
=> 1.37s with No plugins whatsoever, just YOUR plain demo site, what happen with a website with some plugins like shipping and email, SMS ….. that relate to Woocomerce? It might took 2 to 3 second and even longer.
https://prnt.sc/pb93s7 ===> DNS problem, SSL, Initial conection, you got it all. AGAIN, it’s your THEME demo, No PLUGINS, not MINE.
Now what’s your solution here? Install no plugins? How am i suppose to do business then.
If you can’t answer this or dont want to answer this, feel like lack of supportive attitude just say it and call your manager to do it just like the last time.
Just dont watse my time on this!
1 more stupid answer i’ll rate this theme 1 star with a full report. I sick of fighting for my reporting again like the last time just becuz some guys who dont even understand ENGLISH and “Nothing wrong sir, nothing wrong sir”.
Last time is like 5 long ass replies to explain details and finanlly you guys admit it is a bug, how much you want this time? 10?
September 26, 2019 at 12:44 pm #146815
Artem TemosKeymasterReport the bug => you reponse with “nothing wrong” => try to convince and explain with 5 long ass replies and finally a manager come out and admit it is a bug and fix it with an update. Now it’s you again, the irresponsible supporter.
I have reviewed your previous topics and all your issues were resolved just when you provided us with full information. Yes, sometimes it may take a bit more time than expected, but we do our best to resolve them asap.
Really? Server again, it’s a fresh VPS, 65RAM and 16 vcore with just plain wordpress, what’s wrong with my server anyway?
The server work speed depends on a lot more things than just RAM and CPU cores. Our server has a lot more power but performs better. Unfortunately, we are not system experts but just WordPress developers. That is why we suggest you to ask some specialists or hosting provider support to investigate this for you.
Nothing wrong with your theme? Your server? then what is this? Read what i said above about taking a break 1 to 2 minutes … and then click at the ADD TO CART button again
We tested our demo and waited for 1-2-3-5 minutes. Please check result videos:
https://gyazo.com/61d14d8af238c04221fc5dc155a6eb60
https://gyazo.com/a63cabe64e8685a72f8f52a95050b620
https://gyazo.com/57a769624c7be6293d4c82a315db3708
https://gyazo.com/aa81762e6d4362716c8e42b0ea16d10a=> 1.37s with No plugins whatsoever, just YOUR plain demo site, what happen with a website with some plugins like shipping and email, SMS ….. that relate to Woocomerce? It might took 2 to 3 second and even longer.
Have you tested it with other themes on your website? You can check with default Storefront WooCommerce theme and the same amount of plugins installed. If you will see that it works faster then it is related to the theme. You can check this on the shop page where default WooCommerce AJAX function exists.
Now what’s your solution here? Install no plugins? How am i suppose to do business then.
We cannot be responsible for all your plugins installed. If they harm your website performance it doesn’t mean that it is related to our theme.
1 more stupid answer i’ll rate this theme 1 star with a full report. I sick of fighting for my reporting again like the last time just becuz some guys who dont even understand ENGLISH and “Nothing wrong sir, nothing wrong sir”.
If you are not satisfied with our theme you are free to write any review anywhere if you say true. Otherwise, we will contact Envato and report your offensive behavior and abusing of their reviews system. Or we can return your money back if you request a refund here https://themeforest.net/refund_requests/new
Otherwise, lets continue the discussion and check everything carefully and we would be happy to fix the issue if it really exists in our theme.Thank you for understanding.
Kind Regards
Xtemos studioSeptember 27, 2019 at 9:18 am #146996
luan0409ParticipantYeah customers are always wrong of course, then why?
“all your issues were resolved just when you provided us with full information.”
Seriously? Last time i record a fucking video from the start and you obviously dont even look or check at that, that’s why it took a bunch of replies to get it done, and i almost have to pay for others to fix your stupid bug. So what the fuck is “full infomation” that i have to give you everytime? Face to face in real life?
“If you are not satisfied with our theme you are free to write any review anywhere if you say true. Otherwise, we will contact Envato and report your offensive behavior and abusing of their reviews system. ”
My review is not true? It’s always about your half ass support attitude all the time that lead me wasting my time all the time when i try to create a topic.
If you answer me with an indepth answer like above, we already dont have this kind of conversation but it’s you guys all the time “Nothing wrong sir”, “need custom job” just to get it done.
Only with the previous topic is enough for me to tell it’s the truth that your supporting suck. And that’s the truth.
September 27, 2019 at 9:32 am #147001
Artem TemosKeymasterPlease, be patient and let continue working on the case if you don’t mind. We already sent you all the results about our tests and proved that it is not related to our theme. Have you performed other tests after this? What else should we do to investigate the issue and help you? We would be very happy to resolve it asap.
Thank you for the understanding and sorry for the inconvenience.
September 29, 2019 at 2:55 am #147306
luan0409ParticipantThe important thing is:
1. When i add to cart on anyplace else NOT in the Single Product page => the theme use AJAX=ADD-TO-CART, which very fast only 200ms to 300ms, WITH or WITHOUT PLUGINs
2. When i add to cart on main ADD TO CART BUTTON on Single Product Page => the theme use ADMIN-AJAX.PHP, which very slow if i add anymore plugins even not the Woocommerce one.
——–200 to 300s WITHOUT PLUGINS
——–500ms to 600ms or even 900ms WITH PLUGINS.You can look at this picture to see clearly =>> http://prntscr.com/pcc5yo => this is WITH PLUGINS
————————————————————————————-
So my request is there anyway to Make the MAIN ADD TO CART BUTTON to use
?wc-ajax=add_to_cart
Instead of using
admin-ajax.php
Becuz this PHP can be easily affected by adding any plugins not just woocommerce.
I’ve opened a lot of plugins and seen they all use this Admin-Ajax.PHP in their plugin source.
All the themes and plugins use it at once will causes it SUPER SLOW. Even the wordpress itself using this Admin-Ajax.php too which cause WordPress Admin Dashboard super slow if i add too many plugins.
Thanks for reading.
September 29, 2019 at 11:46 am #147368
Artem TemosKeymasterHello,
Yes, you are right. By default, WordPress AJAX requests use this file. WooCommerce in its turn created a separate entry file for it. But as WooCommerce doesn’t have AJAX on the single product page we implemented our own function and it uses standard WordPress core API. We will take some time to investigate it and check if it is possible to do this via WooCommerce file and get back to you. But in general, plugins you use shouldn’t slow your website down. If they slow that particular request then they will slow all things on your website. So we would like to suggest you investigate plugins performance too.
Kind Regards
September 29, 2019 at 2:11 pm #147387
luan0409ParticipantThank you so much, hope you can find the solution soon 😀
I’ve already send emails to all the author of important plugins to change the source code too. Hope things went well.
September 30, 2019 at 9:04 am #147505
Artem TemosKeymasterTry to edit the file
woodmart/inc/integrations/woocommerce/functions.php
and change the line as shown on screenshot http://prntscr.com/pcrus6add_action( 'wp_ajax_woodmart_ajax_add_to_cart', 'woodmart_ajax_add_to_cart' ); add_action( 'wp_ajax_nopriv_woodmart_ajax_add_to_cart', 'woodmart_ajax_add_to_cart' );
to this one
add_action( 'wc_ajax_woodmart_ajax_add_to_cart', 'woodmart_ajax_add_to_cart' );
and also the file
woodmart/js/functions.js
like this http://prntscr.com/pcrudgurl: woodmart_settings.ajaxurl,
to
url: wc_add_to_cart_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'woodmart_ajax_add_to_cart' ),
and disable JS combine and minify options in Theme Settings -> Performance.
September 30, 2019 at 3:44 pm #147614
luan0409ParticipantThank you so much 😀 It’s working now 😀
Never thought that problem got solved so fast 😀
September 30, 2019 at 6:34 pm #147630
newsprinceParticipant@Artem Temos
I can confirm it is working but it does not have any real benefit, in our case at least.
The ajax add to cart on single product is fluctuating between 500ms and 700ms with and without the above fix.
I think your original ajax add to cart does not have any problem to fix it in the first place.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register