• Resolved assadniang

    (@assadniang)


    Hello,

    The wishlist count is not updated when I add a product to my wishlist.

    You can see on top right hand corner, just add a product to wishlist.
    I am using YITH woocommerce wishlist plugin

    By contrast, when I add a product to the basket, the count is displayed correctly.

    • This topic was modified 3 years, 2 months ago by assadniang.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @assadniang

    Thank you for reaching out and I am happy to assist you with this.
    I’ve visited the URL and I can see that W3 Total Cache is currently active on your website.
    I’ve tried to replicate the problem, however, once I’ve added the products to the wish list or cart, the wishlist and cart count updated everytime:

    I’ve tried different browsers and I’ve experienced no problem with count updating when adding the product to the wishlist.
    Thanks!

    Thread Starter assadniang

    (@assadniang)

    Thank you for looking into it.

    The way you reproduce it, is after you add a product to your wishlist, click on a product to navigate away from the homepage, and then when you go back to the homepage, it will reset to 0.

    Same issue for the currency converter next to it.
    When you change the currency, and navigate away from the homepage, when you go back to the homepage, it will be different.

    • This reply was modified 3 years, 2 months ago by assadniang.
    • This reply was modified 3 years, 2 months ago by assadniang.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @assadniang

    Thank you for the feedback.
    I’ve checked this and yes you are correct. The reason for this is that the page is..Cached.
    The reason why the CART is the only part of the page that is updated correctly is that woo commerce cart has something that is called cart-fragments.min.js
    Basically, WooCommerce calls /?wc-ajax=get_refreshed_fragments in order to update the Cart items and Cart total asynchronously i.e. without the need of refreshing the website page you’re visiting.
    In order to make the Cart update on every page of your website, WooCommerce runs this Ajax functionality every time.
    This bypasses the cache and retains the functionality of the Cart.
    Now the wishlist and currency do not have that option or at least not that I know of. So in order for those to work, it should the same as for the cart fragments.
    Since ajax requests bypass the cache, they can also potentially slow down the website.
    Now, W3 Total Cache’s main purpose is to improve website performance and that means to cache pages.
    There are two ways to solve this. One and recommended is to check the Woocomerce settings and potentially reach out to their support and check if there is a possibility to load wishlist and currency with ajax.
    The other is via W3 Total Cache and it’s called Page Fragment Caching. This allows you to manually wrap the specific PHP code with <–mfunc/–> comment which allows that part of the page to remain uncached.
    The potential problem with this is that this does not work with the Disk: Enhanced caching method, so you need to switch to Disk: Basic or use Memory-based caching like Redis or Memcached.
    You can check more details about Page Fragment Cache on our FAQ page.

    I hope this helps!
    Thanks!

    Thread Starter assadniang

    (@assadniang)

    @vmarko

    Thank you for the support.

    I will reach out to the plugin developer with your comment and see if they can resolve it

    assad

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @assadniang

    You are most welcome! Please share any helpful information here.
    THanks!

    Thread Starter assadniang

    (@assadniang)

    For the currency switcher, I found a setting:
    I found an option that said:
    >I am using cache plugin on my site
    I turned it on and now it works.

    For the Wishlist, there is also an option that says
    >Load Ajax
    When I turned it on, it still did not work
    Have contacted the plugin dev, and waiting for an answer

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Wishlist count is not updated when w3tc cache is enable’ is closed to new replies.