• I have to manually clear the cache to see the discount.

    Only if discount is coupon based than it shows, but that’s because I’ve excluded cart and checkout page from caching.

    Any ideas on how to solve cache issues?

    Some plugins use cookie exclusion, what about your plugin?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi

    Thanks for reaching out.

    We would like to let you know that our plugin checks the product/cart pages every time when product is added to the cart or removed from the cart.

    If there is any cache set, our plugin cannot be able to display correctly while adding or removing the products to the cart.

    This is the reason we recommend removing or disable the cache to resolve the same.

    Hope this helps!

    Thanks
    Team Flycart

    Thread Starter Husein Yuseinov

    (@webg)

    Removing the cache plugin to make your plugin work correctly is not a solution! Core Web Vitals and speed performance these days is way more important than managing discounts, actually, I assume that more than 80% of woocommerce websites are using cache plugins.

    I hope you find a way of dealing with cached content besides removing the cache plugins.

    Regards!

    Plugin Author flycart

    (@flycart)

    `Hey

    Our sincere apologies. We misunderstood that you were referring in the context of testing the rules. That is testing them immediately after creating them.

    During the testing, you may have to clear the cache to see the discount reflecting after making changes to the rules.

    But, the rules will work for the normal customers in the product pages even if you are using the cache plugins.
    The only requirement is: after creating and publishing the rules (or when you make a change in the rules), please clear / purge the cache “once” so that the discounted price appears.

    the crossed out original price and sale price will show up even if the product pages are cached.

    Example: let’s say you offer a 10% store wide discount.
    Even if the pages are cached, the discount is same for all customers. So they can see the discount.

    Let’s take another example, you have tiered discounts like:
    1 to 10 quantity- 2%
    11 and above – 5 %

    In this case, when the page loads first time for the customers, it will show the 2% discounted price.
    When customers increase the quantity above 10 in the product page, the pricing will be updated via an ajax call.

    Even in the worst case scenario, the discount will show up in the cart and checkout pages, which always have dynamic content and all the cache plugins automatically exclude these pages from caching.

    Finally, caching is like photocopying a page and serving the same to everyone. If the original content changes, it doesn’t change the photocopy. If we adopt like a cookie based exemption to overcome this, then it is more like serving pages without caching. That means, there is no usecase for a cache plugin.

    So when using a caching plugin and “dynamic” discount together, it’s possible to show the discounted price in 90% of the discount scenarios.
    But we got to be realistic. There might be a few scenarios where showing the discounted price on cached product pages might not be possible. In those scenarios, the cart and checkout pages will come to the rescue and show the discount.

    Hope we have answered your questions.
    If you need any assistance, please feel free to open a ticket at https://www.flycart.org/support

    We’re happy to help 🙂

    Thanks
    Team Flycart

    • This reply was modified 4 years, 11 months ago by flycart.
    Thread Starter Husein Yuseinov

    (@webg)

    Thanks for the detailed response, the problem appears in the scheduled discounts. After the scheduled date is reached discount is applied but unfortunately not visible due to a cache issue, the cache has to be cleared, and then a discount appears.

    Plugin Author flycart

    (@flycart)

    Thank you for the quick response.
    We understand the scenario. I guess this is one of the scenarios where automatic cache cleaning is required.

    May be a cron based automatic scheduled cache cleaning will work ?
    https://docs.wp-rocket.me/article/494-how-to-clear-cache-via-cron-job

    Will also check with our developers and see if we can come up with a small code snippet that can run a scheduled clean of the cache (like cleaning it an hour after the scheduled discount rule goes live)

    Thanks

    Thread Starter Husein Yuseinov

    (@webg)

    Thanks, we’ll try that!

    Happy to help 🙂 @webg

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘How you deal with cache plugins like WP Rocket?’ is closed to new replies.