Jump to content

Problem With Read Reviews Button


Recommended Posts

Hi. (Read Reviews) button on product page not working. After clicking on button it added in link (idTab5) but nothing happens

 

If I click on ( Tab REVIEWS ) and thereafter to Read Reviews he raises the page and shows all reviews.

 

Maybe someone knows what the problem is

Thanks...

 

My shop deltawings . fr

Link to comment
Share on other sites

  • 10 months later...

Hello,

 

File to edit:

/themes/YOUR THEME/js/modules/productcomments/js/productcomments.js

 

I solved the Issue by adding:

        $('.nav-tabs li').removeClass('active');
        $('.tab-content div').removeClass('active');

        $('.nav-tabs li:last-child').addClass('active');
        $('.tab-content div:last-child').addClass('active');

 just after:

    $(document).on('click', 'a[href=#idTab5]', function(e){
    
        $('*[id^=idTab]').addClass('block_hidden_only_for_screen');
        $('div#idTab5').removeClass('block_hidden_only_for_screen');

        $('ul#more_info_tabs a[href^=#idTab]').removeClass('selected');
        $('a[href=#idTab5]').addClass('selected');

 

My complete code is:

        $(document).on('click', 'a[href=#idTab5]', function(e){
    
        $('*[id^=idTab]').addClass('block_hidden_only_for_screen');
        $('div#idTab5').removeClass('block_hidden_only_for_screen');

        $('ul#more_info_tabs a[href^=#idTab]').removeClass('selected');
        $('a[href=#idTab5]').addClass('selected');
        
        $('.nav-tabs li').removeClass('active');
        $('.tab-content div').removeClass('active');

        $('.nav-tabs li:last-child').addClass('active');
        $('.tab-content div:last-child').addClass('active');

});

 

 

For a smooth scroling effect to the div I have added:

        $.scrollTo('#THE DIV YOU WANT', 400, {'offset': -50 });
    return false;

 

Complete final code:

    $(document).on('click', 'a[href=#idTab5]', function(e){
        $('*[id^=idTab]').addClass('block_hidden_only_for_screen');
        $('div#idTab5').removeClass('block_hidden_only_for_screen');
        $('ul#more_info_tabs a[href^=#idTab]').removeClass('selected');
        $('a[href=#idTab5]').addClass('selected');    
        $('.nav-tabs li').removeClass('active');
        $('.tab-content div').removeClass('active');
        $('.nav-tabs li:last-child').addClass('active');
        $('.tab-content div:last-child').addClass('active');    
        $.scrollTo('#THE DIV YOU WANT', 400, {'offset': -50 });
    return false;    
    });

 

In my case it was on line nº42

* I put "#THE DIV YOU WANT" because I'm not using defaults tab and I don't know the name of the default tabs. You have to change it with the correct div id

 

It has worked well on my prestashop version which is 1.6.1.6

Hope it can help

Regards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...