WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
W3 and WooCommerce / Shopping Carts (57 posts)

  1. onlyshawn
    Member
    Posted 1 year ago #

    timit; UNCHECK 'set expires header', I believe, is the issue.

  2. timit
    Member
    Posted 1 year ago #

    Know it is working.

    I probably forgot to click on "empty cache"
    (To rebuild the database cache use the "empty cache".)

  3. James
    Member
    Posted 1 year ago #

    This issue would appear to have been noted now, at long last, by the developers. I just upgraded to the latest (2.0.7) version of the WC plugin and noticed the following error message had appeared:

    "In order for database caching to work with WooCommerce you must add _wc_session_ to the "Ignored Query Strings" option in W3 Total Cache settings here".

    See screenshot here:
    http://matchlessclueless.com/wp-content/uploads/2013/04/Capture.png

    This is interesting as I had previously added "wc_session_" (i.e. no underscore at the start) to the list of ignored query strings and this seemed to have worked for me, so not sure of the difference or significance between the two versions of "_wc_session_" and "wc_session". I have both added now just to be sure anyway.

    James

  4. Watch Teller
    Member
    Posted 1 year ago #

  5. James
    Member
    Posted 1 year ago #

    Hmmm, interesting:

    W3 Total Cache Minify Settings:
    Ensure your add ‘mfunc’ to the ‘Ignored comment stems’ option in the settings.

    Not heard of this one before - would we need to add this under the minify settings page? That's the only place I can find 'ignored comment stems' mentioned so far. Has anyone tried this or had any success? I'm not going to have chance to play around for a few days yet, so for the moment will leave minification turned off, but interested to hear any one elses experiences....

    Strange they haven't mentioned the other more critical issues that have already been discussed in this thread isn't it?

    Regards, James

  6. mtamony
    Member
    Posted 1 year ago #

    I had to set minify to manual and added the 'mfunc' to ignore comment stems. I think my store is working again.

    test.edwardcolver.com

  7. gethooked23
    Member
    Posted 1 year ago #

    My site is now loading for me in between 1-3 seconds. (Both logged in and out)

    1. Using Cloudflare Pro ( I am only using Pro because of the SSL feature for https)

    2. W3TC w/ Page Caching: Disk Enhanced and Browser Cache with rules also set in .htaccess. No additional scripts in functions.php nor defer scripts in footer.php

    3. I no longer have to disable Page Caching for the Header Cart Widget to function properly. I added wc_session_cookie to the Rejected Cookies in Page Caching Settings. It is no longer caching the cart widget and appears to be helping with caching other elements on the page.

    I do not know if this is the correct resolution, but it seems to be working great for me.

    I hope this helps someone.

  8. Tuxen
    Member
    Posted 1 year ago #

    @gethooked23

    I also use Cloudflare, W3TC and Woo but it is not working for me - would it be possible to export and import the configuration?

  9. gethooked23
    Member
    Posted 1 year ago #

    @Tuxen

    Here you go. Just copy to notepad or any editor you like and save as .php

    Click Here to see config

    Visit http://www.captmacks.com/final/ to see how it is working if you wish.

    I hope this helps.

  10. Watch Teller
    Member
    Posted 1 year ago #

    @Tuxen pls remove the cloudFlare key & URL from @gethooked23.

  11. gethooked23
    Member
    Posted 1 year ago #

    @watchteller,

    Thanks! I missed that. Removed.

  12. Webplus
    Member
    Posted 1 year ago #

    Ok i don't get what is going on with my homepage, but i keep having the mistake where i can't update or remove things from my cart, or well i can update/delete the cart if i choose the option twice The homepage is
    http://www.butikknagerækken.dk

    If anyone can help me.. i'd be happy

  13. leanderbraunschweig
    Member
    Posted 1 year ago #

    OMG – It worked! Finally...

    Thanks to @gethooked23 and the exclusion of the session-cookies my cart no longer 'breaks' upon deleting an item. Before I had to disable Browser Caching all together which increased load times massively.

    My advice / solution:

    1. Follow the first two steps / settings laid out with http://docs.woothemes.com/document/configuring-caching-plugins

    2. Reject the 'wc_session_cookie' within the Page Cache settings

    3. Enter _wc_session_ into the ignored query stems field, more on this here: http://www.wpmagi.com/w3-total-cache-configuration-and-woocommerce-tip

    Thanks for all of your answers / posts!

  14. James
    Member
    Posted 1 year ago #

    @gethooked23 - Can you repost your config file again please, it seems to be giving a 404 now.

    My shop has been working fine for months, but seems to have developed problems again after recent WP, WC and theme updates. The 'add to cart' button in the product archives isn't doing anything now, but thankfully the one on the product page still works!

    Cheers, James :'(

  15. James
    Member
    Posted 1 year ago #

    Just found a solution (I think) to my 'add to cart' buttons in the product archives not working (i.e. not adding the product to the cart, but it may appear after a few page refreshes).

    There is a new option in the 'Catalogue' page of the WC options menu in the WP admin area which says "Enable AJAX add to cart buttons on archives". I think this appeared in the last WC update which would be about the time my shop stopped working properly. But turning off this option seems to do the trick (along with all the other settings described previously in this thread).

    Not sure what this option actually does, so think I can live without it. Another option to try if you're still having difficulties getting WC to play nicely with W3TC.

    My other recomendation is to sign up (free) for the Cloudflare service and use their minification services rather than the W3TC ones. This seems far more reliable and solved many problems I was having with my theme and WC when I tried to enable W3TC minification.

    James

  16. Mezloh
    Member
    Posted 1 year ago #

    @gethooked23

    Would you be able to add your configuration text to this thread again. The previous link you posted returns 404 error.

    Great site you have there.

    Thanks

  17. gethooked23
    Member
    Posted 1 year ago #

    Here is my config.

    Hope this helps someone.

    Click Here for config

  18. Mezloh
    Member
    Posted 1 year ago #

    Thanks @gethooked23 I appreciate the post. Just might save many others from headaches.

    Take Care

  19. Martin
    Member
    Posted 1 year ago #

    Have any of you guys had problems with the Remove Item from cart not working?
    Or any clues as to an answer maybe?

  20. toniodobrasil
    Member
    Posted 1 year ago #

    @Mezloh.
    Would you mind to share the setting, please ;-)
    Thank to all of you ...
    Regards

  21. Mezloh
    Member
    Posted 12 months ago #

    @toniodobrasil the configuration setting are in the download link in the post by @gethooked23 right above mine

    T

  22. gethooked23
    Member
    Posted 12 months ago #

    I have placed the zip file back onto my site.

    Remember, I am using Cloudflare and Maxcdn with W3TC

    Click Here For Config

    I hope it helps some of you.

  23. Riy
    Member
    Posted 12 months ago #

    Hello,
    I installed w3 (latest) and woo commerce (1.6) and setup the required exception pages. All seems to be working fine.
    Except woocommerce_mini_cart in the home page and other pages are cached so it does not update when an item is added.

    Does anyone know a workaround for this.

    Appreciate your help

  24. magnumcreative
    Member
    Posted 12 months ago #

    @Riy you may want to look at the PRO version of W3, it has fragmented caching and is what you are likely looking to implement to resolve cart/quantity caching issues

    http://www.w3-edge.com/weblog/2013/09/w3-total-cache-pro/

  25. Riy
    Member
    Posted 12 months ago #

    Thank you for the reply. I will look into the pro version.

  26. sproutN
    Member
    Posted 12 months ago #

    I go to add _wc_session_ (or wc_session_ or _wc_sessions_ ... I've seen several suggestions) to the database cache - ignored query stems field. After clicking Save All Settings, the page refreshes to my homepage but none of the changes are ever saved.

  27. hardigi
    Member
    Posted 11 months ago #

    Thanks to emielm, james and gabrielstuff for their excellent advice on this issue. I followed all instructions and got everything working as it should providing that I specifically set cache-control in the browser cache settings page to "private, no-cache, re-validate" for every page. Even then I still had the occasional problem where an item was added to the basket but when you went to the cart it was nowhere to be seen!

    To solve this issue I would recommend unchecking "Enable AJAX add to cart buttons on archives" in Woocommerce settings in the catalog menu.

    This will force the page to refresh when an item is added to the basket and the url will have "?added-to-cart=12345" at the end of it. It is not as slick as adding items via Ajax (without a page refresh) but it works! I've tried adding many items from different pages, deleting items, refreshing the page, changing quantities, pretty much everything possible to break the basket but cannot.

    The added bonus is once you have done this you can then re-enable cache-control in the browser cache settings. To be on the safe side I have set mine to "public, must-revalidate, proxy-revalidate" but you might be able to get "expires with max-age" working. Make sure you have also unchecked "Cache URIs with query string variables" on the Page Cache settings page.

    Providing that you have followed the other steps mentioned before this then you should notice a real benefit. The ultimate setup would be to use fragment caching but I haven't experimented with this yet.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic