• Resolved Shadician

    (@shadician)


    Hi,

    When we have variation swatches enabled we are no longer able to add any items to cart. Obviously this is a bit of a problem for our store so we have disabled the plugin.

    If I click add to cart with the Swatches plugin switched on, nothing happens at all and the item is not added. Works fine without.

    We do have an AJAX slide-out side-bar cart set up with our store, so maybe this is having an impact. But all our other WooCommerce plugins work without issue, and theefault WooCommerce variation options work fine for adding to cart when Swatches plugin is disabled.

    This has been happening for many months, we had hoped it would be fixed in an update but we still have the issue so now logging this support ticket. Hopefully you can help!

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

Viewing 1 replies (of 1 total)
  • Plugin Support fizanzvai

    (@fizanzvai)

    Hi,

    Thanks for reaching out to us. It is difficult to inspect without experiencing the issue. I have visited the link you have shared, I found swatches plugin is disabled. It seems like you were facing the swatches selection issue. It was not selected and you have tried to cart an item.

    So, I have checked your script list. Then I can see you have added jQuery CDN on your site- https://paste.pics/QMW1W

    WordPress Core has its default jQuery, you don’t have to enqueue it again. Please check the default JS libraries of WordPress Core- https://developer.www.ads-software.com/reference/functions/wp_enqueue_script/#default-scripts-and-js-libraries-included-and-registered-by-wordpress

    You can enqueue the jQuery like this to use the built-in jQuery library-

    wp_enqueue_script( 'jquery' );

    Rather than like this

    wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js');

    Our plugin is dependent on the default jQuery library of WordPress. Please remove the additional CDN for jQuery. Then enable the Swatches plugin and try again on your site.

    I hope this will help.

    Thank You

Viewing 1 replies (of 1 total)
  • The topic ‘Unable to add products to cart’ is closed to new replies.