I want to display all approved products reviews programmatically on home page.
1 Answer
you can use this method to retrieved review collection
$collection = Mage::getModel('review/review')
->getCollection()
->addStoreFilter(Mage::app()->getStore()->getId())
->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
->setDateOrder('desc');
in cms home page call your file like this
{{block type="core/template" template="namespace/module/filename.phtml"}}
you can use this collection directly in phtml file or you can use it via your own block.
-
it is not working.what i need to write in "filename.phtml" file. Commented Jun 17, 2016 at 8:54
-
-
-
-