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

    (@vmarko)

    Hello @apendix

    Thank you for your inquiry and I am happy to help.
    W3 Total Cache should clear the cache and the stock should be updated.
    To confirm that this is related to W3 Total Cache, can you please disable W3TC temporarily and see if the issue persists? If the issue is gone, re-enable W3TC and go to Performance>General Settings. Disable the settings one by one (Start with Object Cache and DB cache if enabled) and see which option might be causing this.
    Thanks!

    Thread Starter Mitko

    (@apendix)

    I forgot to clarify… W3 purges the product page cache. But it doesn’t clear the cache for the shop page, so the product seems to be still available on the shop page.

    Is there any solution except excluding shop page from cache?

    Kind Regards,
    Mitko

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @apendix

    Thank you for the information.
    You can exclude any page from being cached in Performance>Page Cache>Advanced>”Never cache following pages” field. Now since you have not shared the website URL, I can only give you an example, so you can add:
    /shop/
    and make sure to save all settings and purge the cache.
    Thanks!

    Thread Starter Mitko

    (@apendix)

    The problem is that I do want to cache my shop page. But I’d like to clear cache after a purchase.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @apendix

    Thank you for the information.
    I understand now. As I stated in the first post, the cache should be cleared on all pages. Can you please provide the link to the specific page? Which plugin are you using for updating the stock?
    Does the stock number update if the W3 Total Cache is disabled?
    Thanks!

    Thread Starter Mitko

    (@apendix)

    Hi Marko,
    Here is the address:
    https://mia-works.com/shop/
    here is a product with only one stock quantity
    https://mia-works.com/shop/pokrivki/runner-spring-flower/
    Yes, the stock number is updated and everything is OK when the W3 Total Cache is disabled.
    In fact I’m talking about the missing label “sold” on the shop page when a visitor purchased the last one. Only when the visitor open the product page he can see the actual status of the stock. But on the shop page the product still looks like available for purchase.

    I didn’t understand this question:
    “Which plugin are you using for updating the stock?”
    I use woocommerce… Is that the right answer?

    Here is a video capture
    https://youtu.be/6qFxa6ml9ZI – w3 disabled
    https://youtu.be/6qFxa6ml9ZI?t=51 – w3 enabled

    Kind Regards,
    Mitko

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @apendix

    Thank you for the clarification.
    Can you please disable Page Caching and see if the issue persists so we can determine what may be causing this?
    Also please share which settings you have enabled in Performance>General settings.
    Thanks!

    Thread Starter Mitko

    (@apendix)

    Hi @vmarko,

    when Page Caching is disabled everything is OK.

    enabled:
    Minify
    Minify mode:auto
    Browser Cache
    Lazy load images
    Enable Google Page Speed dashboard widget
    Verify rewrite rules
    Anonymously track usage to improve product quality

    Kind Regards,
    Mitko

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @apendix

    Thank you for the information.
    There is also a possibility that the option in Performance>Browser cache>HTML&XML>Set Expires header and Cache-control may be keeping cached pages on the browser. Can you re-enable Page Cache and disable the mentioned option, save all settings and purge the cache and see if the issue persists?
    Thanks!

    Thread Starter Mitko

    (@apendix)

    No change.
    The problem is that on the shop pages – the main page and the category page, the status is not updated. On the product page it’s updated.

    Now I noticed something strange. When I open the shop page https://mia-works.com/product-category/pokrivki/page/2/ in incognito mode there is no change. But when I open it after admin login the status is properly changed. When I log out again no change.

    Edit: I’ve cancelled the purchase. If you need I can simulate again purchase and you can see the difference between the product page and the shop page status.

    • This reply was modified 3 years ago by Mitko.
    • This reply was modified 3 years ago by Mitko.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @apendix

    Thank you for the information
    Can you please share the info on how you are adding the label to the product?
    Are you using the core woocomerce or some add-on plugin for this?
    What is the caching method you are using for Page Caching?
    Thanks!

    Thread Starter Mitko

    (@apendix)

    Hi @vmarko,
    I believe that I use the core woocomerce. If I change the theme the issue persists.
    I use the default method – “disk enhanced”

    Kind Regards,
    Mitko

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @apendix

    Thank you for the info.
    You should try excluding the cookies from the cache.
    Go to Performance>Page Cache>Advanced and user the Reject Cookies: add the following:

    yith_wcwl_session_
    woocommerce_recently_viewed
    wp_woocommerce_session_

    Save all settings and purge the cache and see if the issue persists.
    Thanks!

    Thread Starter Mitko

    (@apendix)

    Hi @vmarko,
    this did the job. But now the pages loads much slower. At least 2-3 times slower. Perhaps as the plugin is disabled.

    Tools like pingdom.com and PageSpeed Insights do not register slower speed, but I’ve tried myself several times adding and removing suggested rows and always adding them slows down the speed.

    Here is a video capture, I’ve trashed the test order, so the actual status should be In stock.

    Kind Regards

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

    (@vmarko)

    Hello @apendix

    Thank you for the information.
    This is because some parts are now excluded from the cache. And therefore the pages do not come from the cache.
    The only other thing I can suggest is to reach out to the support of Woocommerce and see if this can be achieved with ajax to bypass the cache.
    Alternatively, the only solution is to purge the cache every time product is updated by creating a custom rule for purging (W3 Total Cache does not have that option) However I would not recommend that.
    Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Clearing cache after a woocommerce order’ is closed to new replies.