magento 根据产品id获取产品评论及数量

$_reviews = Mage::getModel('review/review')
    ->getCollection()
    ->addStoreFilter(Mage::app()->getStore()->getId()) 
    ->addEntityFilter('product', $product->getId())
    ->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
    ->setDateOrder('desc')
    ->load();
$_reviews->getSize();//数量



你可能感兴趣的:(magento 根据产品id获取产品评论及数量)