• Resolved bigrat95

    (@bigrat95)


    Hi,

    I enabled back orders in USA only.

    The add to cart is removed when it detects that the client is from another country.
    The code work well when I test it on my dev environment without caching enabled.

    The issue is that once I pushed it live, the add to cart button show up in other countries because my live environment have caching enabled. The button has been cached by the system from users in USA.

    Is there a way to exclude the plugin from the cache or just make it do an Ajax refresh on page load?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jose Vega

    (@josevega)

    Hi. Thank you for getting in touch.

    This is a common problem in ALL the geolocation plugins. The solutions are:
    – The next update will have support for WPRocket to keep separate caches per country (we don’t support other cache plugins). It will be released in one week.

    – Most cache plugins allow you to exclude certain pages or URLs, you can exclude the product pages containing /product.

    – Ajax is not an option because it would make one additional request per page view, it would easily overload a cheap server.

    In short. You can wait until we release the next update or disable the cache for those pages.

    Thread Starter bigrat95

    (@bigrat95)

    good news, but i don’t use any cache plugin. I use WP ENGINE.

    Maybe the update will work for WP ENGINE ..?

    Plugin Author Jose Vega

    (@josevega)

    You can contact WPENGINE and they will exclude your product pages from the cache. Check this: https://wpengine.com/support/wpengine-ecommerce/

    Thread Starter bigrat95

    (@bigrat95)

    Thanks for the help, but i dont want to exclude my product pages because it will slow down the site a lot.

    The only issue i see for now would be to load the add to cart via an AJAX refresh.

    Plugin Author Jose Vega

    (@josevega)

    Ok, Ajax is the only solution if you want to continue using the cache.

    I’ll work on it and include this feature in the next update. It will be released in a couple of days.

    Thread Starter bigrat95

    (@bigrat95)

    Awesome!!! In the same update of this week? Let me know how i can contribute. Is there way to donate?

    Plugin Author Jose Vega

    (@josevega)

    Yes, you can buy the premium plugin to support the development… The update should be released by Monday.

    Thread Starter bigrat95

    (@bigrat95)

    Great! I am buying it right now! Thank you very much ??

    Plugin Author Jose Vega

    (@josevega)

    Hi. I released the update. The settings page has the option to apply restrictions via ajax, so it works with all cache systems. This feature is premium.

    Let me know if you need more help.

    Thread Starter bigrat95

    (@bigrat95)

    Awesome ! I bought the pro lifetime plugin yesterday and the update work like a charm :).

    I only had to hide the in stock / out of stock message because they are not taken into consideration.

    I’ve been looking so long for plugins like this which include cache support and I couldn’t find any.

    I will recommend your plugin to everyone I know.

    If I can make a suggestion for future release it would be to add the Ajax restriction to the stock messages and also add a little loader icon when the Ajax is running instead of showing the add to cart for 1 sec.

    Thank you very much :)))))

    Plugin Author Jose Vega

    (@josevega)

    I’m glad that it worked for you.

    Thank you for the suggestions. I’ll do it for the next update. If you have more ideas for new features let me know, you can contact me directly on my website ??

    • This reply was modified 5 years, 2 months ago by Jose Vega.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Exclude the add to cart button from caching’ is closed to new replies.