fbpx
🤝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🤝 Grab it Now

Add to cart button stops working. YITH WooCommerce Product Bundle Premium + Variation Swatches For WooCommerce Pro

Lars Ottinger

Hi

Im using YITH WooCommerce Product Bundle Premium + Variation Swatches For WooCommerce Pro.

When I add a variable product to a Product Bundle, the Add to cart button stops working. It looks like if we don´t have all the variables for one product, the Bundle can´t be bought. How is this possible to fix?

YITH Support theme wrote this:

After a deep de bug I found the problem seems to be an incompatibility between our plugin and Variation Swatches for WooCommerce. If you disable this plugin, you can select the variation and add the bundle product to the cart. Could you make a test and disable variation swatches and make a test? For this reason when only simple products are added, it works fine. I suggest you to contact variation swatches and ask their to add compatibility for bundle products.

Hope You can help us.
Best regards!

Lars

Hakik Zaman

Hi Lars,

Thanks for reaching out to us. Sorry for your inconvenience.

Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out the issue.

It’s a development local site, please login here and set up your theme. And try to reproduce your issue here.

https://wptestbox.com/97299/wp-admin/

Username: admin

Password: demo

So that, I can refer this issue to our development team.

Thanks in advance for your co-operation.

Lars Ottinger

Hi again!

Thansk for reply, but not sure how to set everything up if I can´t add YITH WooCommerce Product Bundle Pro? The Free version only lets me add single products. Any idea?

But. This is what happens at our site:

1. We create a new product – and set it to Product Bundle.
2. We add products to the Bundle.
3. The Add to cart button works as long as I only add single products OR a variable product that we have all the variations in stock.
4. If one of the sizes/colors for that variable product is out of stock, the Add to cart button will not be able to press. Even do the customer choose a size that is in stock.

You will find an example here: https://gaochlopkliniken.se/butik/behandlingspaket/hallux-valgus/hallux-valgus-behandlingspaket/
As You see it has two variable products. If I delete Schein rullsula – kolfiberinlägg för hallux valgus och hallux rigidus the Add to cart button works fine.

Hope You can help

Hakik Zaman

Hello Lars,

Thanks for your explanation. Actually, it is really difficult to give a fix without accessing the plugin codes.

I have added a premium version of YITH WooCommerce Product Bundle Premium.

Please reproduce your issue on our local development site. So that, I can refer this issue to our development team.

It would be great if you also provide a screencast based on your issue.

Please let me know after reproducing your issue.

Thanks in advance for your co-operation.

Lars Ottinger

Hello,

I have set everything up. Looks like that the Bundle works fine in the testenvironment. Detached an image of how the Live site looks like after choosen the variantions I Want. Still not possible to push Add to cart button.

Feel free to have a look on that product in the live environment as well.

Hakik Zaman

Hello Lars,

YITH Bundle is working fine on the local development site, right? So, from the technical perspective, there is no issue with YITH Bundle Pro and Swatches plugin.

You can perform a compatibility test using the health check plugin or by doing these steps to identify the error :

=> Deactivate all of your additional plugins except WooCommerce, YITH Bundle Pro, and WooCommerce Variation Swatches Plugin.

=> See if the problem persists. If the problem is resolved, you can tell which plugin might be the culprit of this error by activating your additional plugins one by one.

You can also test by switching to a default theme.

Looking forward to hearing from you soon.

Thank you

Lars Ottinger

Hi again!

So I have continued to test in my testenvironment. And if I deactivate Variation Swatches for WooCommerce – Pro everything works fine. Don´t have to change anything else.

I have been in contact with the theme (WP Astra) as well and they came to the same conclusion. Se their answer written in italic style below. YITH support also told me that the problem came from Swatches.

I would really appreciate if You could have another look at this issue for me.

Best regards!

Lars

Hello Lars,

Greetings for the day 🙂

I checked your website and found that one of the plugins is causing some issues with the theme. The problem occurs after activating the Variation Swatches for WooCommerce – Pro plugin. And deactivating it fix the issue.
Here is a screencast for reference: https://d.pr/v/2S1dux.

I will be testing the plugin on my end. In the meanwhile, may I suggest getting in touch with the plugin developer for the same?

I hope that helps.

Hakik Zaman

Hello Lars,

Thanks for sharing the message with us. The issue is with Variation Swatches Pro. You have already uploaded a sample bundle product on our local development site.

I have reproduced the issue by installing the Variation Swatches Pro.

https://wptestbox.com/97299/wp-admin/

Username: admin

Password: demo

I am referring this issue to our development team. I will get back to you once I get an update from them.

Till then please be patient with us.

Thanks

Lars Ottinger

Hi!

What is the status? Haven´t heard anything for two weeks. Starting to think it´s not going to work and in that case we have to switch to another plug-in. Please get back with some info.

Lars

Hakik Zaman

Hello Lars,

Really sorry for your inconvenience. I have already pushed them for you.

They replied-

We are working on this issue and it is a critical javascript conflict and trying to find a solution. Please give us some time.

Thanks in advance

Hakik Zaman

Hello Lars,

Basically, YITH Bundle Plugin’s javascript added disabled class after selecting a variation on a single product page.

Our dev team is working on this issue and still, they couldn’t fix the JS conflict with the YITH bundle. You can install and activate Code Snippet Plugin. Then put the below code as a snippet inside Code Snippet-

function wvs_temp_yith_bundle_solution(){
   global $product;
   $add_to_cart_button = '<input type="submit" class="single_add_to_cart_button button alt yith-wcpb-add-to-cart-button" value="'.esc_html( $product->single_add_to_cart_text() ).'">';
   return $add_to_cart_button;
}

add_filter('yith_wcpb_single_product_add_to_cart_button', 'wvs_temp_yith_bundle_solution');

Note: It is not a permanent solution. But it is a temporary solution for you.

We will notify you once the dev team confirms a permanent solution. Till then please use the above snippet.

Thanks