Home › Forums › WoodMart support forum › Activate new tab after clicking the button on description page
Activate new tab after clicking the button on description page
- This topic has 35 replies, 2 voices, and was last updated 2 years ago by Artem Temos.
-
AuthorPosts
-
November 22, 2022 at 6:28 pm #422905
addyParticipantHello,
I want to activate the “additional product tab” when a button is clicked on the description page.
I already had this functionality working in 4.5.2 version of woodmart.
But today, I update to 7.0 and this functionality is no longer working.
We added the following code on a button (on Click)-
setTimeout(function() { jQuery('.woodmart_additional_tab_tab').siblings().removeClass('active'); jQuery('.woodmart_additional_tab_tab').addClass('active'); var $tab = jQuery('.woodmart-tab-wrapper').find('a.active'); $tab.siblings('.wc-tab').hide(); jQuery('#tab-woodmart_additional_tab').show(); window.location = "#storereviewsblock"; }, 10); if(jQuery('.woocommerce-tabs .cr-reviews-slider .slick-active').width() <= 0) { setTimeout(function () { if (jQuery('.woocommerce-tabs .cr-reviews-slider.slick-initialized:visible').length) { jQuery('.cr-reviews-slider').slick('setPosition'); } }, 200); goTo( $('#storereviewsblock') ); } function goTo(el) { $('html, body').animate({ scrollTop: el.offset().to
The above code was provided by your team 2 years ago and it has been working fine until today I updated the theme – https://xtemos.com/forums/topic/additional-tab-to-be-active-on-loading/#post-180397
Please let me know what needs to be changed.
- This topic was modified 2 years, 1 month ago by addy.
November 24, 2022 at 11:20 am #423373
Artem TemosKeymasterHello,
As we can see, this code is different from the one provided in the previous topic. It looks like it was created by you or your developer and not by our support member.
Kind Regards
November 24, 2022 at 11:27 am #423383
addyParticipantIt was slightly modified to suit our neeeds. But the heart of the code was provided by your support team and it is no longer working. I have only updated your theme and have not updated any other plugins. SO THE FAULT IS FROM YOUR THEME’S LATEST VERSION
So kindly provide the updated version of this part of code -https://xtemos.com/forums/topic/additional-tab-to-be-active-on-loading/#post-180397
Please help. Do not waste my time.
- This reply was modified 2 years ago by addy.
November 24, 2022 at 11:39 am #423394
Artem TemosKeymasterPlease, add the code that we gave in the previous topic on your website and send us a link to the page so we can check if it works.
Note that we can help you only with the code that was provided by our team. Then you will slightly modify it to your needs.Kind Regards
November 24, 2022 at 12:22 pm #423410
addyParticipantUnfortunately, we cannot provide test website login at the moment as it is busy with some other functionalities.
Can’t you simply test this code by your support in your systems and provide me the updated code?
setTimeout(function() { jQuery('.woodmart_additional_tab_tab').siblings().removeClass('active'); jQuery('.woodmart_additional_tab_tab').addClass('active'); var $tab = jQuery('.woodmart-tab-wrapper').find('a.active'); $tab.siblings('.wc-tab').hide(); jQuery('#tab-woodmart_additional_tab').show(); }, 10);
Topic – https://xtemos.com/forums/topic/additional-tab-to-be-active-on-loading/#post-180397
November 24, 2022 at 1:29 pm #423454
Artem TemosKeymasterHello,
Here is a working code
setTimeout(function() { jQuery('.additional_information_tab').siblings().removeClass('active'); jQuery('.additional_information_tab').addClass('active'); jQuery('.woocommerce-Tabs-panel').hide(); jQuery('#tab-additional_information').show(); }, 10);
November 24, 2022 at 3:40 pm #423510
addyParticipantFirst of all,
I am not able to test.
We restored the old version and then tried to install the new version but this time it says error in installing the update
“An error occurred while updating Woodmart: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature”
We have put your license only on one website.
Screenshot attached.
Attachments:
You must be logged in to view attached files.November 24, 2022 at 3:41 pm #423513
Artem TemosKeymasterHello,
Try to do the following to update the theme:
1. Go to Dashboard -> WoodMart -> Theme License and deactivate the theme.
2. Go to Dashboard -> Updates and click on Check Again.
3. Activate the theme with your purchase code again.
4. Go to Dashboard -> Updates and click on Check Again.
5. Try to update the theme via Appearance -> Themes or via Dashboard -> Updates.
Regards
November 24, 2022 at 4:02 pm #423528
addyParticipantThe code is working now. But it is not perfect.
1) The “additional tab” opens up. But instead we want to open “Store reviews” tab
2) There should be some margin from the “top” so that the “tab” is visble on screen.Testing instructions on private
November 24, 2022 at 5:53 pm #423606
addyParticipantI am waiting for your response ASAP
November 24, 2022 at 5:57 pm #423610
Artem TemosKeymasterThe code works for the Additional information tab correctly on your website now. As for the custom button, it looks like you customized it. So now you need to take the code we gave you and add your custom functions.
Sorry, but we don’t know how your custom code was supposed to work and can’t repair it since it has some broken JS.Kind Regards
November 24, 2022 at 6:07 pm #423620
addyParticipantOkay. I don’t know.
All I know is that everything was working fine until Woodmart 4.5.2
If you don’t believe me, you are free to intall 4.5.2.
I am giving you the admin access.
After login > go to HTML block >> Temporary blocks >> click edit >>> then find a green button “go to reviews”
You can test the result on this product page (Link in private)
When you open the button settings, scroll down to “onclick command”
This was the working code as of 4.5.2
setTimeout(function() { jQuery('.woodmart_additional_tab_tab').siblings().removeClass('active'); jQuery('.woodmart_additional_tab_tab').addClass('active'); var $tab = jQuery('.woodmart-tab-wrapper').find('a.active'); $tab.siblings('.wc-tab').hide(); jQuery('#tab-woodmart_additional_tab').show(); window.location = "#storereviewsblock"; }, 10); if(jQuery('.woocommerce-tabs .cr-reviews-slider .slick-active').width() <= 0) { setTimeout(function () { if (jQuery('.woocommerce-tabs .cr-reviews-slider.slick-initialized:visible').length) { jQuery('.cr-reviews-slider').slick('setPosition'); } }, 200); goTo( $('#storereviewsblock') ); } function goTo(el) { $('html, body').animate({ scrollTop: el.offset().top + '-400px' }, 'slow'); }
Now, you provided the updated code. But it is working partially. So please check.
The purpose of the code it to open “Store reviews” tab when clicked on button. The bottom part of the code helps the reviews slider not break. This code was always been working. I have verified multiple times by restoring to woodmart 4.5.2
Please check
Admin in privateNovember 24, 2022 at 6:09 pm #423624
Artem TemosKeymasterBut we never gave you this particular code. It is different from the one we sent. It means that this code is developed by you or your developer, right?
Kind Regards
November 24, 2022 at 6:13 pm #423628
addyParticipantNo. 2 years ago, we discussed about this in email when my support expired.
1) The first part of the code is given by you.
2) The second part of the code was given by “Customer reviews plugin”But again, everything was working fine until Woodmart 4.5.2.
The latest version of woodmart screwed up so it is also your responsibility to provide a fix.
November 24, 2022 at 6:14 pm #423630
Artem TemosKeymasterIn this case, you need to contact your plugin developer for help on the second part. The first one works fine and we are not responsible for any third-party codes provided by plugin developers. Even if they don’t work after the theme update.
Kind Regards
November 24, 2022 at 6:15 pm #423631
addyParticipantNo. The first part is not working.
It is not opening the “Store reviews ” Tab.
Kindly don’t try to find excuses not to deal with this . It is not helping any of us.
- This reply was modified 2 years ago by addy.
November 24, 2022 at 6:20 pm #423637
addyParticipantand why should I contact the “customer reviews plugin?
I didn’t updated their plugin since the last time they provided the solution for your theme.
I ONLY updated your theme so you can only provide the solution.
That’s why I keep auto-updates OFF and I update one by one to track who’s fault it is .
Kindly check the code and help provide the fix.
- This reply was modified 2 years ago by addy.
November 24, 2022 at 6:26 pm #423639
Artem TemosKeymasterOK, here is a code that opens your custom tab instead of “additional information”
setTimeout(function() { jQuery('.wd_additional_tab_tab').siblings().removeClass('active'); jQuery('.wd_additional_tab_tab').addClass('active'); jQuery('.woocommerce-Tabs-panel').hide(); jQuery('.woocommerce-Tabs-panel--wd_additional_tab').show(); }, 10);
November 24, 2022 at 6:32 pm #423642
addyParticipantCan you think of the code in the same approach as you did 2 years ago?
Because I think the second part of the code is dependent on that variable you created in first part.
Which variable? – See screenshot
Attachments:
You must be logged in to view attached files.November 24, 2022 at 6:46 pm #423646
Artem TemosKeymasterWe tried to test it one more time on your website but tabs don’t work at all now. It looks like some other error on your website. Could you please check it and send us a link where we can test the code with working tabs?
November 24, 2022 at 7:11 pm #423653
addyParticipantTabs are not working because I added the code you provided.
Remove the code from the button and the tabs will work.
You can test the link in private
November 25, 2022 at 10:31 am #423765
Artem TemosKeymasterWe see the following text when trying to open the provided link
Site restoration in progress, please visit that website a bit later, thank you! :)
Kind Regards
December 2, 2022 at 5:18 pm #425778
addyParticipantPlease watch a 45 second video recording (Audio ON as I explain live demonstration).
Summary of above video: The button functionality stops working if you update woodmart 4.5.2 to 7.0
All faults to woodmart latest version. You are free to update woodmart to latest version and provide a solution..
Do not update anything else such as plugin.
Please find the login details in Private
December 5, 2022 at 10:20 am #426196
Artem TemosKeymasterHello,
We understood the problem already and described to you why it doesn’t work. All we want to do now is to provide you with a part of the code that you took from the previous topic that will work with the new version of the theme. After this, you will be able to slightly modify it to your needs as you did already.
Kind Regards
December 5, 2022 at 10:30 am #426211
addyParticipantI don’t know. I want the entire code to be working.
I gave you the screenrecording and admin access proving that “our code” is working in woodmart 4.5.2. But it is not in 7.0. Please take full responsibility to fix the entire code
setTimeout(function() { jQuery('.woodmart_additional_tab_tab').siblings().removeClass('active'); jQuery('.woodmart_additional_tab_tab').addClass('active'); var $tab = jQuery('.woodmart-tab-wrapper').find('a.active'); $tab.siblings('.wc-tab').hide(); jQuery('#tab-woodmart_additional_tab').show(); window.location = "#storereviewsblock"; }, 10); if(jQuery('.woocommerce-tabs .cr-reviews-slider .slick-active').width() <= 0) { setTimeout(function () { if (jQuery('.woocommerce-tabs .cr-reviews-slider.slick-initialized:visible').length) { jQuery('.cr-reviews-slider').slick('setPosition'); } }, 200); goTo( $('#storereviewsblock') ); } function goTo(el) { $('html, body').animate({ scrollTop: el.offset().top + '-400px' }, 'slow'); }
I want above functionality to be working in woodmart 7.0
Kindly use your expertise. it might be hardly less than 5 minutes for you. Do not make excuses. All the faults are of the latest version of theme. Not the third party plugin.
December 5, 2022 at 10:32 am #426217
Artem TemosKeymasterPlease, update the theme to the latest version and we will check why our part of the code doesn’t work.
Kind Regards
December 5, 2022 at 10:42 am #426222
addyParticipant1) First check the live functionality and understand the above working code. ( it is working on 4.5.2)
2) Update the theme yourself to 7.0 ( you have the admin access)
3) You will then notice that the above code doesn’t works as it is working in 4.5.2This way, you will better observe.
December 5, 2022 at 10:51 am #426227
Artem TemosKeymasterWe saw how it works already. Please, update the theme and remove the old code so we can check the new one that we already sent you previously in this message https://xtemos.com/forums/topic/activate-new-tab-after-clicking-the-button-on-description-page/#post-423639
December 5, 2022 at 11:14 am #426235
addyParticipantI have now updated the theme to 7.0
The code is not working now.Please check and provide a solution.
December 5, 2022 at 1:15 pm #426265
Artem TemosKeymasterWhen we try to edit the button in the product description we see the infinite loading https://gyazo.com/148a35ea6d8882d5b9ba27b1f5251234
Could you please check it from your end and let us know how to edit this button and test the code?Kind Regards
-
AuthorPosts
Tagged: additional tab, product tab
The topic ‘Activate new tab after clicking the button on description page’ is closed to new replies.
- You must be logged in to create new topics. Login / Register