WPIntell

Source evidence

WC Product bundles compatibility

Conditional Logic for Woo Product Add-ons · support · 2024-09-24T07:04:00+00:00

mixedsentiment
mediumseverity
0.84relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

10 / 35 rows with source links

28.6% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

25 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
daheadcracker resolved
Hey, I bought the plugin and for me it is not compadible with the official product bundles plugin of woocommerce. The conditions are set up base on the product variation, I can see the addon checkboxes are loading first and then are getting hidden. The correct ones should be unhidden as soon I choose a variation but nothing happens on the bundle product page where the variable product is implemented. On the variable product page where the addons are implemented it works with no issues. I can see that addons without a condition are working fine in a bundle. Any plans to make it compatible? This topic was modified 1 year, 8 months ago by daheadcracker . This topic was modified 1 year, 8 months ago by daheadcracker . Hi there, Since you purchased the premium version, could you please reach out to us through the support channel inside your WP admin panel? To do so, go to Plugins > Conditional Logic for WooCommerce Product Add-Ons > Contact Us ( https://prnt.sc/AfRP7J3Klmyu ), then fill out this form: https://prnt.sc/YBkJ4S6KcdzU . We’re not allowed to provide support for premium users through the forum due to wp.org policy. Thank you! Hi, ok I will do that. But it could be also beneficial for other users I think, as other scripts of other plugins could also lead to the same issue, and now that I dug a bit mor into the code I can see why it is happening. “wp-content/plugins/woocommerce-product-bundles/assets/js/frontend/add-to-cart-bundle.js” is like your plugin also listening to the “found_variation” event. But in the end of its callback function it is calling “event.stopPropagation();” which is preventing the event Propagation to your script here: “wp-content/plugins/conditional-logic-for-woocommerce-product-add-ons-premium/assets/frontend/frontend.js” So I’m currently looking for a way to prioritize your eventlistener before the one of the product bundles plugin. I see you enqueue your script here: wp-content/plugins/conditional-logic-for-woocommerce-product-add-ons-premium/src/Frontend/Frontend.php I tried to prioritize your script using the add_action( ‘wp_enqueue_scripts’, … method whithout success. But I guess it comes down to this jQuery logic: https://stackoverflow.com/questions/8779657/priority-when-more-than-one-event-handler-is-bound-to-an-element-via-jquery I tested now adding a second listener to the “bundled_item” div instead of the document (like described in above link) which is a direct child of the cart form, exactly like the product bundle plugin is also doing it and it works: // Product Bundles Support jQuery(‘.bundled_product’).on(‘found_variation’, (function (e, variation) { this.selectedVariation = variation[‘variation_id’]; this.triggerConditionalRules(); }).bind(this)); Ok, hooking an additional listener onto the ‘.bundled_product’ class seems to solve the issue. This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . Hey, We understand the issue you’re facing, and while adding an additional event listener is a potential workaround, we’re not sure if it’s the ideal long-term solution. Just last week, WooCommerce released new versions of Product Add-ons (7.1) and Product Bundles (8.1+) with compatibility fixes. We’ve added this to our task list and plan to include extended compatibility in the next plugin update. However, if you need a quicker resolution, we’d be happy to provide you with a beta version as soon as we have compatibility ready. Please feel free to reach out the way I mentioned earlier, and we’ll prioritize getting that to you. Ok, Thanks for taking care of this. In the meantime I had to do some other adjustments: Whenever one of the variations in the bundle was changed, the other bundle products lost their selected product addons, therefore I needed to filter for the attribute of the variations. // Variation dependencies jQuery(‘.bundled_product’).on(‘found_variation’, (function (e, variation) { if( variation.attributes[‘attribute_pa_attr1’] || variation.attributes[‘attribute_pa_attr2’] ){ this.selectedVariation = variation[‘variation_id’]; this.triggerConditionalRules(); } }).bind(this)); 2. When I made a bundle product optional, clicking the checkbox lead to also loose the selected addons of the other products in the bundle. Therefore I needed to check if the variation of that product is actually set when the reset_data event triggers: jQuery(document).on(‘reset_data’, (function (e, variation) { if(variation != undefined){ this.selectedVariation = 0; this.triggerConditionalRules(); } }).bind(this)); Hope this helps you with the new release. This reply was modified 1 year, 8 months ago by daheadcracker . Hi there, We just released a 2.1.5 version of the plugin, which contains compatibility fixes for Product Bundles. Can you please update the plugin to the latest version and let us know if all works fine on your side? Thanks, Meow Crew This reply was modified 1 year, 7 months ago by Andrew Young .

Comments

5 shown
Andrew Young 2024-09-24T08:35:00+00:00

Hi there, Since you purchased the premium version, could you please reach out to us through the support channel inside your WP admin panel? To do so, go to Plugins > Conditional Logic for WooCommerce Product Add-Ons > Contact Us ( https://prnt.sc/AfRP7J3Klmyu ), then fill out this form: https://prnt.sc/YBkJ4S6KcdzU . We’re not allowed to provide support for premium users through the forum due to wp.org policy. Thank you!

daheadcracker 2024-09-24T09:43:00+00:00

Hi, ok I will do that. But it could be also beneficial for other users I think, as other scripts of other plugins could also lead to the same issue, and now that I dug a bit mor into the code I can see why it is happening. “wp-content/plugins/woocommerce-product-bundles/assets/js/frontend/add-to-cart-bundle.js” is like your plugin also listening to the “found_variation” event. But in the end of its callback function it is calling “event.stopPropagation();” which is preventing the event Propagation to your script here: “wp-content/plugins/conditional-logic-for-woocommerce-product-add-ons-premium/assets/frontend/frontend.js” So I’m currently looking for a way to prioritize your eventlistener before the one of the product bundles plugin. I see you enqueue your script here: wp-content/plugins/conditional-logic-for-woocommerce-product-add-ons-premium/src/Frontend/Frontend.php I tried to prioritize your script using the add_action( ‘wp_enqueue_scripts’, … method whithout success. But I guess it comes down to this jQuery logic: https://stackoverflow.com/questions/8779657/priority-when-more-than-one-event-handler-is-bound-to-an-element-via-jquery I tested now adding a second listener to the “bundled_item” div instead of the document (like described in above link) which is a direct child of the cart form, exactly like the product bundle plugin is also doing it and it works: // Product Bundles Support jQuery(‘.bundled_product’).on(‘found_variation’, (function (e, variation) { this.selectedVariation = variation[‘variation_id’]; this.triggerConditionalRules(); }).bind(this)); Ok, hooking an additional listener onto the ‘.bundled_product’ class seems to solve the issue. This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker . This reply was modified 1 year, 8 months ago by daheadcracker .

Andrew Young 2024-09-25T14:45:00+00:00

Hey, We understand the issue you’re facing, and while adding an additional event listener is a potential workaround, we’re not sure if it’s the ideal long-term solution. Just last week, WooCommerce released new versions of Product Add-ons (7.1) and Product Bundles (8.1+) with compatibility fixes. We’ve added this to our task list and plan to include extended compatibility in the next plugin update. However, if you need a quicker resolution, we’d be happy to provide you with a beta version as soon as we have compatibility ready. Please feel free to reach out the way I mentioned earlier, and we’ll prioritize getting that to you.

daheadcracker 2024-09-26T07:51:00+00:00

Ok, Thanks for taking care of this. In the meantime I had to do some other adjustments: Whenever one of the variations in the bundle was changed, the other bundle products lost their selected product addons, therefore I needed to filter for the attribute of the variations. // Variation dependencies jQuery(‘.bundled_product’).on(‘found_variation’, (function (e, variation) { if( variation.attributes[‘attribute_pa_attr1’] || variation.attributes[‘attribute_pa_attr2’] ){ this.selectedVariation = variation[‘variation_id’]; this.triggerConditionalRules(); } }).bind(this)); 2. When I made a bundle product optional, clicking the checkbox lead to also loose the selected addons of the other products in the bundle. Therefore I needed to check if the variation of that product is actually set when the reset_data event triggers: jQuery(document).on(‘reset_data’, (function (e, variation) { if(variation != undefined){ this.selectedVariation = 0; this.triggerConditionalRules(); } }).bind(this)); Hope this helps you with the new release. This reply was modified 1 year, 8 months ago by daheadcracker .

Andrew Young 2024-10-10T19:27:00+00:00

Hi there, We just released a 2.1.5 version of the plugin, which contains compatibility fixes for Product Bundles. Can you please update the plugin to the latest version and let us know if all works fine on your side? Thanks, Meow Crew This reply was modified 1 year, 7 months ago by Andrew Young .