Why is the reviews tab not displayed on my theme ?

If the "Reviews" tab of the module does not show up on your product page, it is very likely that your theme either does not respect the standard PrestaShop theme structure, or that this section of HTML code was manually removed from your theme.

(It is also true for PS 1.6 with themes that include tabs on the product page. In this case, you should update your module with a version over 4.0.x and benefit of the option that allow you to display reviews in the "product page" tabs)

The "Reviews" tab should show up like this on your product page:

If that is not the case, then some HTML elements have been modified in your theme. Below is the standard source code of the product page template (product.tpl) on PrestaShop 1.5. You can forward this to your webmaster or web agency so they can take a look:
 


The 2 IDs "more_info_tabs" and "more_info_sheets" are required for the tabs to work correctly.

The "block_hidden_only_for_screen" CSS class also needs to be present in the main CSS file in PrestaShop (themes/your_theme/css/global.css)

One of the effects performed by our module is to scroll the page down and to reveal the contents of the "Reviews" tab. This can only happen if the HTML structure is respected, with the <li><a></a></li> tags. 

Here is the code in our module that does this in : templates/hook/reviews.tpl, line 91 :

onclick="$('a#more_info_tab_reviews[href=#idTab{$iIdTab}]').trigger('click'); $.scrollTo( 'a#more_info_tab_reviews', 1200 );"

########## IMPORTANT #############

For the tabs to be highlighted when active, look in the module's template file templates/hook/product-tab-content.tpl, lines 167 to 191, and find this javascript code:

function deactivateReviewTab() {
    if ($('#more_info_tabs').length != 0) {
       $("#more_info_tabs li").each(function(i, elt)
       {
          if ($(this).find('a[href=#idTab1]').length != 0 ) {
            $('a', this).addClass('selected');
         }
        else {
          $('a', this).removeClass('selected');
       }
    });
  }
  if ($('#more_info_sheets').length != 0) {
     $("#more_info_sheets").children().each(function(i, elt)
     {
          if ($(this).attr('id') == 'idTab1') {
             $(this).removeClass('block_hidden_only_for_screen');
          }
         else if ($(this).attr('id') != '') {
            $(this).addClass('block_hidden_only_for_screen');
        }
    });
  }
}
setTimeout(function() {deactivateReviewTab()}, 3000);

Every time the product page is displayed, 2 things can happen: 

- If a customer posted a review or clicked one of the review pagination links (if you have more than 1 page of reviews in your tab), the "Reviews" tab will then automatically be highlighted and displayed. You can also easily identify this by looking at the URL. If it has one of these parameters in it: bPost=true ou iPage=x, then you shoudld not encounter any problems.

- If a customer just clicked on a link to display the product page, our tab will be visible for a few seconds and then will be hidden. This allows for enough time for the Facebook API to render the "Like" buttons for each review. The first tab of the product page will then be displayed again. 

If your theme is a non-standard theme or does not respect the standard HTML structure and does not have an ID of 1 for the "More info" tab, then you will need to modify the JavaScript line of code in our module (templates/hook/reviews.tpl) as follows:

if ($(this).find('a[href=#idTab1]').length != 0 ) { => Replace ID idTab1 with the one used by your theme's "More info" tab.

Don't forget to set Smarty Force Compile to "Yes" in your back-office (Preferences -> Performance) to regenerate the compiled template files.

########## / IMPORTANT #############

If this still does not fix your problem, you can take a look at our other FAQ's regarding integration problems on http://faq.businesstech.fr/faq.php?id=43

Other FAQs in this category