Adding a product to the cart takes 10 seconds

This topic has 6 replies, 3 voices, and was last updated 4 months, 2 weeks ago ago by Andrew Mitchell

  • Avatar: hafunerix
    hafunerix
    Participant
    June 28, 2024 at 08:31

    I have noticed that adding a product to the cart takes a very long time. After clicking “buy now” or “add to cart” the text disappears from the button and adding the product to the cart takes at least 10 seconds.

    It looks like the page is broken for a moment. I have checked in different browsers and on my phone and the problem is the same everywhere.

    I use WP Rocket premium and I wonder if this plugin can cause this delay?

    https://postimg.cc/RqFKCnby

    PS. Yesterday I updated the Xstore theme to the latest version.: 9.3.14

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 28, 2024 at 08:50

    Hello Hafunerix,

    Thank you for reaching out and bringing this issue to our attention. We understand how important a smooth and efficient shopping experience is for your website.

    We recommend that you disable all third-party plugins that are not included with XStore
    (https://www.8theme.com/documentation/xstore/plugins/included-plugins/). After doing so, please clear your browser’s cache and check again. It is possible that one of these additional plugins is causing compatibility issues with our theme.

    Ajax adds to cart speed depending on server response time and DB structure. Theme sends requests to your DB and waits for a response. So, if it’s slow, ​please try to speed up the server response time. We can do nothing with it, you need to contact your hosting provider.

    Best Regards,
    8Theme’s Team

    Avatar: hafunerix
    hafunerix
    Participant
    June 28, 2024 at 09:12

    Unfortunately all plugins are used and are necessary for the store to function.

    The server is also very fast. My second site on this server, set up on GeneratePress, is lightning fast without any expensive caching plugin like WP Rocket. Take a look:

    https://skrotowo.pl/

    My previous store on this server based on Woocommerce and the Woodmart theme also worked without any problems, lightning fast without any caching plugin.

    How do I speed up this response from the database now?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 28, 2024 at 09:59

    Hello Hafunerix,

    We are not advising you to disable your plugins permanently; rather, we are suggesting a method to identify any issues. Please try disabling your plugins initially, then re-enable them one at a time and conduct testing after each activation. Should you identify a problematic plugin, we recommend contacting their support team for assistance.

    Additionally, to enhance the response time from your database, we advise consulting with your hosting provider.

    Best Regards,
    8Theme’s Team

    Avatar: hafunerix
    hafunerix
    Participant
    July 2, 2024 at 22:56

    Ok. After 2 days of testing the WP Rocket support team contact me with their expertise:

    – The problem you mentioned with the button may be related with slowness to open the shopping cart (even WP Rocket may worsen it) but it is a root Issue in your website. It is likely that the slowness of the ajax request, make the change of styles in that button take as long as it takes to open the cart widget.

    – Your server, could improve the speed of this, check with the hosting, the memory allowances in the plan, try to get some error log and scan if there is any line related to WP Rocket.

    – The server is running a slightly outdated version of PHP: 7.4.33, you could upgrade to a more modern version to gain performance on the server (above PHP 8. recommended)

    – Here is a more technical aspect, but it is important to point it out, which could also be the root of the issue: While page loads, or any itemis added to the cart, several admin-ajax are triggered, eg: status of the wishlist, and add the item to the cart, these requests are not optimized, they are very slow, WP Rocket does not optimize these ajax requests.

    From what I know, you also use WP Rocket and on your DEMO sites the function of adding a product to the cart works very quickly…

    Why does it take so long on my site?

    I noticed that your theme has been compatible with PHP 8.2 for a few days. Does this mean that I can ask my hosting provider to change PHP to a newer one (8.2)?

    I see that you recently fixed the problem with the mini cart:

    https://postimg.cc/8fCsH4yN

    But maybe it has not been completely solved?

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 3, 2024 at 09:23

    Hello, hafunerix,

    We would like to inform you that it is possible to upgrade PHP to version 8.2. However, please be aware that some third-party plugins may not be compatible with this new version. We recommend upgrading to PHP 8.2 and then re-evaluating the performance.

    Should you have any further questions or require assistance, please do not hesitate to contact us.

    Best Regards,
    8Theme’s Team

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.