1

How can you display links to Product reviews on category list page? So I have something like this:

enter image description here

I'm working with the new Magento rwd theme and I have the stars appearing fine on the listing page. I've tried adding the reviews link in template/catalog/product/list.phtml with:

<?php if($_product->getRatingSummary()): ?>
    <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
    <?php if ($this->getReviewsCount()): ?>
        <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>hello</a>
    <?php endif; ?>
<?php endif; ?>

But it is not displaying anything & there are definitly reviews for the products.

3

you can go to template/review/helper/summary_short.phtml there you can add link for the review count

<?php if ($this->getReviewsCount()): ?>
<div class="ratings">
    <?php if ($this->getRatingSummary()):?>
        <div class="rating-box">
            <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
        </div>
    <?php endif;?>
    <span class="amount"><a href="#" onclick="var t = opener ? opener.window : window; t.location.href='<?php echo $this->getReviewsUrl() ?>'; return false;"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a></span>
</div>  <?php elseif ($this->getDisplayIfEmpty()): ?>
<p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.