Monday 20 June 2011

Get All Products Reviews On CMS Page In Magento

Create on phtml file in catalog/product/review.phtml, Place the code below in review.phtml
$collection = Mage::getModel('catalog/product')->getCollection();
foreach ($collection as $product)
{
        //var_dump($product);
$storeId    = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($product->getData('entity_id'));
}

Now create CMS Page in mageto backend and call it as shown below in content section of your CMS page

{{block type="core/template" name="review"  template="catalog/product/review.phtml"}}
and you are done just check it http://yoursite/review.html

2 comments:

  1. Hi, this didn't work for me. My review CMS page just shows the code directly from the review.phtml page. Any suggestion?

    ReplyDelete
  2. Please embed above code in php tags, It was my mistake

    ReplyDelete