• Resolved victorpietro

    (@victorpietro)


    Hello, I’ve recently installed this plugin so I could see color swatches for my products.

    I’ve managed to configure the color swatches, and they correctly appear, but when testing them, they don’t work. Basically, I select one of the color options in my product, but the “buy” button remains disabled. If I click the buy button, an alert pops up saying: “Select one of the product options before adding it to the cart.”, as if I hadn’t select an option.

    I’m not sure how to debug it or what else should I provide to try to fix it. Any help will be very welcome. Thank you in advance.

    Image below shows it:

    Screenshot of the problem

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @victorpietro
    Hope you are well.
    Make sure that there is no error showing in the browser console like this.
    Also, are you using the latest version of the Variation Swatches Plugin which is right now 1.1.15.1?
    However, please clear your browser, website and CDN caches if you have any.
    Thanks.

    Thread Starter victorpietro

    (@victorpietro)

    Hi @humayonk thank you for answer! Hope you’re well too.

    Unfortunately I was still unable to solve the problem.

    Curiously I was able to use the plugin successfully in other ecommerce that I’m developing (the one that failed is already in production).

    Anyways, there are, yes, a few console errors (like, 14 errors, but most of them, like 12, related to Facebook, Pixel and Google Analytics Tag). After further investigating it, looks like they happened because of uBlock Origin and AdBlock extensions that I use. But, as stated, most of these errors seem unrelated to this problem.

    So, after disabling them, there was only 1 console error left (wpo-minify-footer-e529d9e1.min.js:28 Uncaught SyntaxError: Unexpected identifier).

    But when in an incognito window (Chrome)… the plugin worked successfully.

    Now I’m wondering what is the cause of it. Both adblock extensions may be somewhat guilty, but even after disabling them it was still not working… so it really looks like it was caused by this wpo-minify-footer error.

    I have this plugin ‘WP-Optimize – Clean, Compress, Cache’ installed but I’m not really sure how it works. That seems to be messing up cache, somehow. I’m just unsure why, though, because even after clearing my cache, it wouldn’t work correctly… whereas incognito window did.

    EDIT: yes, precisely; WP-Optimize is the problem. When disabling it, Variation Swatches worked perfectly. I wonder if there is any way around that would make it possible to use both of them?

    Thanks in advance.

    • This reply was modified 2 years, 11 months ago by victorpietro.
    • This reply was modified 2 years, 11 months ago by victorpietro.
    • This reply was modified 2 years, 11 months ago by victorpietro.

    Hello @victorpietro,
    Thank you for the details.
    You can follow this video in order to configure the WP-Optimize plugin properly.
    Also, make sure that you have added Variation Swatches for WooCommerce plugin CSS and JS files in the caching plugin exclusion list.
    Thanks.

    Thread Starter victorpietro

    (@victorpietro)

    Hey @humayonk, thanks for your answer and sorry for the late response.

    I’ve followed through the video you sent me and made some adjustments.

    Unfortunately, they didn’t seem to make any difference… Variation Swatches plugin still is not working together with WP-Optimize. 🙁

    I’m also not sure where can I add the CSS and JS files to the caching plugin exclusion list. Is it at “Cache > Advanced Settings > URLs to exclude from caching”? And if so, which files are these exactly? Checking source code in my products page I wasn’t able to identify any CSS or JS file tags from Variation Swatches.

    Thanks in advance.

    • This reply was modified 2 years, 10 months ago by victorpietro.
    • This reply was modified 2 years, 10 months ago by victorpietro.

    Hi @victorpietro
    Thank you for your reply.
    Well in this case please check the instructions in this video.
    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t proceed to add to cart after selecting swatch option’ is closed to new replies.