Caching problem of Woocommerce notices/ errors AJAX

This topic has 6 replies, 2 voices, and was last updated 6 years, 5 months ago ago by Olga Barlow

  • Avatar: kumapanda
    kumapanda
    Participant
    November 6, 2017 at 13:27

    Hello,
    Im using WP Rocket to cache my site. I noticed an caching error and contacted the WP Rocket Team:
    “I had a bug with a woocommerce product. I visited my website and saw at one product page the woocommerce banner “that I have added a specific product to cart”. That must be from another user and when I refreshed the page, the notice was still there. It was only on one product page. Would be great to solve out that problem… I cleared the cache and it was gone, but I think it can happen again!”

    The answered me, that “it’s not related to WP Rocket. It’s more likely related to your theme. The message should be ajax-ed correctly so it doesn’t get cached, but it seems not to be the case on your site. So the message appears for one customer and it gets cached for everyone.”

    Could it be a problem with the implementation of all woocommerce notices and errors or only the add to cart one?

    Could you please fix it in the next update? Thank you!

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 6, 2017 at 13:32

    Hello,

    Have you checked if this issue appears with our theme only or with default Storefront page too?

    Regards

    Avatar: kumapanda
    kumapanda
    Participant
    November 6, 2017 at 13:40

    Hi Olga, I had other sites and never experienced such an error. It must have something to do with the integration of xstore, like the support of WP Rocket mentioned…

    “The way that the theme is displaying the “added to cart” message is not fully AJAX-ed, so it gets cached.

    If you are not able to modify the theme to solve that, or if the theme developer can’t provide a solution, I think you can resolve it either by:
    redirecting to the cart page after addition,
    or by NOT enabling the AJAX add to cart buttons on archives.
    Cheers!”

    But I think that are very bad solutions: redirect to cart page or deactivating ajax add to cart…

    Hope you can sort that out…

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 6, 2017 at 16:36

    Hello,

    I have read the first message that you sent and WP Rocket answer but I’m asking you the different: have you checked if this issue appears with our theme only or with default Storefront page too? You need to enable Storefront theme on this site and try to do the same that you did when our theme was activated. Do you see the cached messages with Storefront too?

    Regards

    Avatar: kumapanda
    kumapanda
    Participant
    November 8, 2017 at 13:44

    Hello Olga I activated storefront theme on the staging site and the message wasn’t cached one time. So it is working with storefront. Hope we can sort that out. Temporarily I deactivated that notice completely… But that is not what I prefer :-/…

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 9, 2017 at 11:52

    Hello,

    Could you provide me the link to product with problem? Because I can’t replicate the issue.
    I have added product using FF http://prntscr.com/h86kks then logged in and checked this product and don’t see any message http://prntscr.com/h86l3r

    Regards

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

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

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