How to display rating in product list in Magento?

I use this url: http://xhtmlandcsshelp.blogspot.in/2010/12/get-products-from-particular-category.html

I need to display a specific product of category id on the home page

So, I used this url, I added

$model->load($_prdIds); $pname = $model->getName(); 

But star rating, how do I display? Can anybody help me?

Thanks in advance...

+6
source share
1 answer

Tested and working on Magento 1.7.0.1


Reviews on homepage


 <?php /** * Instanciate reviews helper */ $this->_reviewsHelperBlock = $this->getLayout()->createBlock('review/helper'); /** * Get products for your category */ $products = Mage::getModel('catalog/category')->load(YOUR_CATEGORY_ID)->getProductCollection(); /** * Loop thru products */ foreach($products as $product) { $product = Mage::getModel('catalog/product')->load($product->getId()); echo $product->getName(); /** * Display review summary with stars. * If correctly configured in back-office: Catalog > Reviews and Ratings > Manage Ratings */ echo $this->_reviewsHelperBlock->getSummaryHtml($product, false, false); echo '<hr/>'; } ?> 
+7
source

Source: https://habr.com/ru/post/925126/


All Articles