Friday, October 16, 2015

Ratings and Reviews count in magento

<?php
$storeId = Mage::app()->getStore()->getId();
$reviewSummaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($_product->getId());
$reviewUrl=Mage::getUrl('review/product/list', array('id'=> $_product->getId()));
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:<?php echo $reviewSummaryData['rating_summary'] ?>%">
</div>
<?php //echo $reviewSummaryData['reviews_count'];?>
</div>
<span class="amount"> <?php echo $this->__('%d Review(s)', $reviewSummaryData->getReviewsCount()) ?></span>
</div>

3 comments:

  1. Your post urges me to create a business website, of course I will free download magento as soon as possible. Magento is truly the best platform ever. Its extensions is also awesome. Thank you.

    ReplyDelete
  2. Do you know what is Magento 2. This is the new era of Magento E-commerce

    ReplyDelete

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...