Support » Plugin: W3 Total Cache » JS minify issue with Woocommerce

Viewing 12 replies - 1 through 12 (of 12 total)
  • No one has solution to this? Currently when I have JS minify disabled my Yslow score drops from 89% to 78% so would be nice to have it fixed.

    Thanks, Jarkko

    Yeah, I have already checked the page but it doesn’t address this issue.

    I was able to track down the issue to be related to add-to-cart-variation.min.js script. The script fails when added to the combined JS file when JS minification is enabled and that’s loaded in the beginning of the page. I added some code to Minify.php to remove the offending JS file from combining and now it works fine. Proper fix would probably be to fix add-to-cart-variation.min.js to work when loaded in the beginning of the page.

    My guess is that the script fails because when the script is loaded in the beginning of the page, the container it tries search for (single_variation_wrap) doesn’t exists, while when the script is loaded in the original location the container has already been defined. I’m no JS script wizard though, but that’s my non-web-programmer hunch (:

    Cheers, Jarkko

    Hi Jarkko [ mod note: corrected spelling of name, that was a typo right? ], I’m not a JS crack. I’d just try to avoid the issue: via jsDelivr?
    Good luck, Patrick

    i have this same exact issue as well.
    i can use the other aspect of the plug in, but once i try to implement minify, i lose the “add to cart” option.

    jarkko, can you share your changes in the files?

    I’ve been struggling with this for some time. The solution is to switch to manual in minify and exclude this JS from minify (for me).

    I think it actually works now with the latest Woocommerce/W3TC. I updated to latest W3TC recently which overwrote my changes to Minify.php (AFAIK), and I don’t have this problem anymore.

    I cannot get minify to work reliably on any of my Dreamhost hosted WordPress blogs. I wonder if there isn’t an issue on their end. I have no idea how to install the other minify tools.

    I’m having the website hosted on Dreamhost, and it seems to work fine.

    Having this problem whilst using W3 Total Cache and Woocommerce.

    Seems that the woocommerce js files do not like being minified. So for a simple, but non-optimal fix;

    W3 Total Cache > Minify > JS > Operations in areas > Combine only.

    Will post again, when I find a better fix.

    is there anyone that can upload w3tc config files to share?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘JS minify issue with Woocommerce’ is closed to new replies.