Successful alert js caching with wp-rocket

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

  • Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 3, 2021 at 14:02

    hi
    i have problem with wp-rocket cache that i can’t see successful messages in the frontend (only in the next page I viewed)
    what is the Inline JavaScript command or JavaScript File that I need to exclude from cache setting so it will not cache it?

    15 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 3, 2021 at 14:20

    Hello,

    Have you contacted the support of the cache plugin?

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 3, 2021 at 16:45

    yes but i need to know from you where is the js that generating the alert messages, file or inline js

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 3, 2021 at 16:50

    Could you provide a screenshot of the mentioned alert?
    You can use the Lightshot screenshot tool to take screenshots and share them.

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 3, 2021 at 21:55

    i am talking about the div:
    <div class="woocommerce-message" role="alert">
    that showing in the bottom of the page (absolute position)

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 4, 2021 at 09:24

    Hello,

    Please provide more detail about the message, for example, when it is shown.
    Provide URL of your site, we want to take a closer look at the situation.

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 10, 2021 at 11:18

    see this for example
    https://www.ecostore.co.il/product/frosch-shower-cleaning-spray/

    1 – try to add the maximum qty to the cart
    2 – then, add more qty to the cart
    3 – you will see the page refresh but nothing happened, the reason is that there is no more qty for this product, so, products not adding to cart and you will not see any message, the DIV “woocommerce-notices-wrapper” empty
    4 – if you will go to some other page, the previews message will appear

    this happened with any cache plugin, I tried a lot..
    i must to know how to exclude this function to pass the cache system
    which js file to exclude? or inline js?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    February 10, 2021 at 19:20

    Hello,

    Could you, please, provide us with temporary WP Dashboard access? We’ll check if issue is related to theme or to WooCommerce plugin.

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 11, 2021 at 12:31

    hi
    it happens with any cache plugin
    maybe this happens because the alert feature is using a PHP code that doesn’t run on cached pages dynamically

    details attached

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    February 12, 2021 at 11:14

    Hello,

    I suppose it could be related to single product builder. I passed this issue to our developers. I’ll inform you once they find the solution.

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 16, 2021 at 07:56

    Hi
    any news?
    this bug make a big problem, customers began to complain that they not getting messages after actions

    * your development team make for me in the past a bug fixing in the product builder, maybe this issue related to this bug https://www.8theme.com/topic/multiple-headers-translating-doesnt-work/#post-261874

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    February 17, 2021 at 15:05

    Hello,

    Take our big apologies for this delay.
    We found that if you disable AJAX Add To Cart For Simple And Variable Products option (Theme Options > WooCommerce > Single product builder > Add to cart > AJAX Add To Cart For Simple And Variable Products > off ) then an alert appears. So, disable that option because we can’t find solution to make that notification appear with the cache plugin and Ajax add to cart.

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 18, 2021 at 11:16

    look, this is a very big bug issue in this template,

    it’s not happened with adding to cart actions only, it’s happened with every action that needs to show some alert message, for example with my “back to stock” plugin (see here https://ecostore.co.il/exam2.webm) and there is more…

    i need from your technical team to give me the exact details about the js commands and js files that making the alert messages in this theme and I will try to exclude them from caching in the setting.

    i have never seen this kind of issue with other themes and caches plugins over my 13 years of WordPress experience, this is something that should fix

    maybe to completely disable the ajax messages in this theme, even if it should need to do something directly in the code…

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    February 18, 2021 at 11:28

    Hello,

    To disable Ajax messages you need to disable Ajax add to cart on the single product page.
    Theme Options > WooCommerce > Single product builder > Add to cart > AJAX Add To Cart For Simple And Variable Products > disable this option. Check the product after that.

    Regards

    Avatar: Itzik_Glam
    Itzik Glam
    Participant
    February 18, 2021 at 15:15

    it’s not helping in other actions, the problem isn’t only with add to cart button please see this new video
    https://ecostore.co.il/exam2.webm

    it happened with every alert message in the website

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    February 19, 2021 at 13:51

    Hello,

    Our theme does not generate these notices. WooCommerce plugin generates notices.
    We just make them fixed with this option https://prnt.sc/100uj0w I have disabled it. Check single product now.

    Regards

  • Viewing 16 results - 1 through 16 (of 16 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.