0

I want to display all approved products reviews programmatically on home page.

1 Answer 1

1

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.

7
  • it is not working.what i need to write in "filename.phtml" file. Jun 17, 2016 at 8:54
  • Collection code
    – Mufaddal
    Jun 17, 2016 at 9:03
  • I already add these code but not working Jun 17, 2016 at 9:06
  • Have you loop through collection data?
    – Mufaddal
    Jun 17, 2016 at 9:06
  • Give me foreach loop code Jun 17, 2016 at 9:12

Your Answer

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

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