0

I am facing an error while displaying some products review and rating count in frontend for certain pages.There are 4 pages where product review and rating count is displayed(home page product slider, search page, category page and PDP). For some products the review and rating count is displaying wrong in search and category view page, and for some products its not yet displayed. For example:

Product P1 has total 71 approved reviews

But in search and category page it will display

review count = 6

In home page product slider and PDP page its displayed correctly But for other products its displaying correctly. I have checked at the code level, from where it gets displayed, but didn't find any thing.
Any idea that why this mismatch is happening?
Below is the code for catalogsearch result page:

<?php if($this->getResultCount()): ?>
 <?php echo (Mage::app()->getLayout()->checkVersion(array('1.9.1.x', '1.9.2.x')) ? $this->getMessagesBlock()->toHtml() : $this->getMessagesBlock()->getGroupedHtml()); ?>
 <?php if ($messages = $this->getNoteMessages()):?>
  <p class="note-msg">
    <?php foreach ($messages as $message):?>
        <?php echo $message?><br />
    <?php endforeach;?>
  </p>
 <?php endif; ?>
<?php echo $this->getProductListHtml() ?>
<?php else: ?>
<div class="page-title">
<p class="note-msg">
<?php echo ($this->getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?>
 <?php if ($messages = $this->getNoteMessages()):?>
  <?php foreach ($messages as $message):?>
   <br /><?php echo $message?>
  <?php endforeach;?>
 <?php endif; ?>

  • Kindly share the code which is implemented on search and category page. – amitshree Nov 10 '16 at 17:21
  • Before asking a new question please accept the previous answers :) @Abhimanyu – Keyur Shah Jan 2 '17 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.