What is the best way to get a collection of product reviews, and retrieve the name and rating number from this collection?
thx.
Take a look at How to get product rating and review in magento
$productId = $product->getId();
$reviews = Mage::getModel('review/review')
->getResourceCollection()
->addStoreFilter(Mage::app()->getStore()->getId())
->addEntityFilter('product', $productId)
->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
->setDateOrder()
->addRateVotes();
/**
* Getting average of ratings/reviews
*/
$avg = 0;
$ratings = array();
if (count($reviews) > 0) {
foreach ($reviews->getItems() as $review) {
foreach( $review->getRatingVotes() as $vote ) {
$ratings[] = $vote->getPercent();
..