Product Accordion Tabs Not Opening as it should be!

guguk

Well-known member
Jul 19, 2019
1,150
828
113
Ottoman Empire
Hello all!
I've stuck a situation which i found problem but i havent found yet the solution.

I'm using Xstore theme latest version


Let me explain with examples.
I'm using accordion tabs as product tabs and default is closed state. There have no issue with simple products but when i check variable products there have a problem with tab's open-close states.

There have 3 tabs for all products and first tabs is "Product Description", second one is custom tab with simple text and last tab is Review tab.

Before this problem occured i have just 2 tabs and i did not use "Product Description" as a tab but customer requested that should be as a tab i converted to tab and placed first one. And there have no problem with tabs before that change.

When i click for opening the any tabs it open up and closing up instantly. And i realized that opening and closing number depends for variant's number :) If color variant number is 5 then when i click any tabs it opening and closing for 5 times :)

I guess this is problem, I mean when i change to "Product Description" to into tab it occured but what's the problem or conflict i havent find yet.

Maybe ajax or woocommerce swatch plugin conflict i donno.

Is there anyone help me for solving this problem? I need to be deliver this project tomorrow.

 

frizzel

Well-known member
Trusted Uploader
Jun 13, 2019
485
253
63
Wherever my imagination takes me
Hm, interesting problem... :unsure:

Just a wild guess and it may not make a difference, but I see that the swatch javascript is loaded rather early, in the head. What if you would change that to load in the footer?
 

guguk

Well-known member
Jul 19, 2019
1,150
828
113
Ottoman Empire
Thank you for suggestion i was thinking the problem swatch plugin.

I tried to move to footer via that code

if (!function_exists('wp_plugin_swatch')) {

wp_enqueue_script('et-woo-swatches-js', plugins_url() . '/et-core-plugin/packages/st-woo-swatches/public/js/frontend.js', '', '1.0', true);
}
add_action('wp_enqueue_scripts', 'wp_plugin_swatch');

but it did not move to footer :unsure:
 

guguk

Well-known member
Jul 19, 2019
1,150
828
113
Ottoman Empire

guguk

Well-known member
Jul 19, 2019
1,150
828
113
Ottoman Empire
Yes, they have fixed it on the demo built with Elementor, but not on WP Bakery, see here: https://xstore.8theme.com/demos/2/marseille03/product/bae-top-2/
Also see what happens when you only change the color option, haha!
So, it's definitely some conflict within their scripts. I suppose they first want to fix the problem in both page builders before releasing an update.
Actually they fixed just "appearing side" :) Because when i click any color description tab opening as usual but when i click "description tab" it getting open and closing up like crazy :)
 

frizzel

Well-known member
Trusted Uploader
Jun 13, 2019
485
253
63
Wherever my imagination takes me
Actually they fixed just "appearing side" :) Because when i click any color description tab opening as usual but when i click "description tab" it getting open and closing up like crazy :)
Not on the Elementor built, at least I see it behaving completely normal, as intended. The last link above is for the WP Bakery built, and that's indeed not fixed at all.
 

guguk

Well-known member
Jul 19, 2019
1,150
828
113
Ottoman Empire
Not on the Elementor built, at least I see it behaving completely normal, as intended. The last link above is for the WP Bakery built, and that's indeed not fixed at all.
Yeah at the elementor version, first tab always open and doesnt change for variable.
But wpbakery version tabs always closed and description changes for variable, may be they just fixed with temporarily trick for just "appearing without any problem" for visitors.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu