Engine23
blogBannerImage
By Engine23

Magento - get the rating of product using review id

How to get the rating of a product using the review id

$ratingCollection = Mage::getModel('rating/rating_option_vote') ->getResourceCollection() ->setReviewFilter($review->getId()) ->setStoreFilter(Mage::app()->getStore()->getId()) ->addRatingInfo(Mage::app()->getStore()->getId()) ->load() ->getItems(); $ratings = array(); foreach($ratingCollection as $item){ $ratings[]=$item->getValue(); }