I have a review.phtml template that shows the review count of the current product using this code:

  $rc = $this->getReviewCount();
if($this->getReviewCount() == 1):
  echo '<img src="' . $this->getLogoSrc() . '" /> <strong>(' . $rc . ' review)</strong>';
elseif($this->getReviewCount() > 1):
  echo '<img src="' . $this->getLogoSrc() . '" /> <strong>(' . $rc . ' reviews)</strong>';

I want to show the review count somewhere else on the page(same product) by putting the code in summary.phtml where the default "leave a review" link is.

This doesnt work as I am sure I need to change $this to where the review.phtml template is?

1 Answer 1


Try this code in your .phtml file

$product = Mage::registry('current_product');
$rc = $product->getRatingSummary()->getReviewsCount();

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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