fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Compatibility with WooCommerce Composite Products plugin

I am using Variation Swatches plugin along with Composite Product plugin by WooCommerce. I just noticed that on composite products, swatches for items that are unavailable are not greyed out. They appear to be selectable but are not. Is there anyway to fix this?

This link is to a composite item that has the majority of its variations sold out.

https://peerlessvisions.com/shop/fundraisers/s3da-drinkware-fundraiser/ if the Polar Camel 16oz Tumbler is selected for the option.

 

This site is live.

Hakik Zaman

Hi Daniel,

Thanks for reaching out to us.

I hope you already know if one script fails to run, the rest of the scripts will not work properly.

Please resolve your console errors: https://paste.pics/PE9I7. Then try again.

Thank You

I deactivated the Wishlist plugin and the problem still exists.

Hakik Zaman

Hi Daniel,

It’s a staging site, please login here and try to reproduce your issue here for one composite product.

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

Username: admin

Password: demo

Please let me know once you replicate your issue. So that I can send it to our development team for further checking.

Note: I have added sample products and necessary plugins except the WooCommerce composite plugins.

Hope to hear from you soon.

Thank You

I was able to reproduce the problem on the test site that you set up.

The composite product that I created is: https://wptestbox.com/composite/product/compositeprod/

I also modified the “t-shirt with logo” to be a variable product,

When the composite product first opens, you can see that some of the “t-shirt with logo” color options are out of stock so they are not selectable. Now, in the “Available Options” pulldown, select the “t-shirt” product, then go back and select the “t-shirt with logo” product. The items that are out of stock are no long crossed out. Even if you select the blue shirt option, you are unable to add it to the cart. The “V-Neck t-shirt” product also exhibits this behavior.

If you go to the regulars “t-shirt with logo” product (https://wptestbox.com/composite/product/t-shirt-with-logo/) everything functions properly, its only when used through a composite product.

If you want/need me to set up a test site on my website, let me know.

Hakik Zaman

Hi Daniel,

Thanks for helping us by reproducing the issue.

I have tried to find the exact trigger from the WooCommerce Composite Products.

Then found the following triggers:

wc-composite-component-loaded
wc-composite-component-unloaded

Unfortunately, these triggers fired after selecting the dropdown not after the below products loaded.

We need a trigger that will be fired after this content is loaded: https://paste.pics/PF0BP. Can you please contact the WooCommerce Composite Product support regarding the trigger?

Please don’t ask for support for the Swatches. Just ask for the specific trigger that loads after this content is rendered: https://paste.pics/PF0BP.

It will help us to inspect it further.

Thanks in advance for your cooperation

Hakik Zaman

Hi Daniel,

Unfortunately, they gave you the action/filter hook lists. We need a JS event trigger that fires after this content is rendered: https://paste.pics/PF0BP.

We have no need for the reference of the PHP action/filter hook.

Just need to print a text using console.log after this content is rendered: https://paste.pics/PF0BP.

If they didn’t keep a trigger, the last option is- disable the swatches for the composite product but not for the variable product type. Our plugin was intended to work with the variable product.

Please let me know your thoughts.

Thank You

I will specifically ask if they have a anything that prints to console.log after the content is rendered.

Hakik Zaman

Hi Daniel,

Thank you so much for your cooperation.

Please let me know if they have any JS triggers after that content is rendered.

Thank You

This is what they told me:

component_options_state_rendered

 

Hakik Zaman

Hi Daniel,

Unfortunately, the trigger doesn’t help. During the tests, I have recorded my screen. Please check this screen record: https://www.loom.com/share/cd7908eba8044dad88f556e52c7f9c65

As far as I checked, I couldn’t find a trigger after that event. So, I think disabling the swatches for the composite product can be a solution.

Thank You