开发者

Filter Magento Product collection for products that have a review

开发者 https://www.devze.com 2023-04-09 22:58 出处:网络
Hi as per title I want to filter for products that have a approved review. Any help appreciated. I have a feeling its 开发者_StackOverflow社区based around the rating summary but not sure how to filt

Hi as per title I want to filter for products that have a approved review.

Any help appreciated.

I have a feeling its 开发者_StackOverflow社区based around the rating summary but not sure how to filter for that?

Thanks in advance.

Chris


function getReviews() {
$reviews = Mage::getModel('review/review')->getResourceCollection();
$reviews->addStoreFilter( Mage::app()->getStore()->getId() )
                ->addStatusFilter( Mage_Review_Model_Review::STATUS_APPROVED )
                ->setDateOrder()
                ->addRateVotes()
                ->load();        

return $reviews;

}

Source: Here

0

精彩评论

暂无评论...
验证码 换一张
取 消