Copy /app/code/core/Mage/Review/Block/Product/View/View.php to
/app/code/local/Mage/Review/Block/Product/View.php. with following code :-
Find the function getReviewsCollection() and replce with below function.
public function getReviewsCollection()
{
if (null === $this->_reviewsCollection) {
$this->_reviewsCollection = Mage::getModel('review/review')->getCollection()
->addStoreFilter(Mage::app()->getStore()->getId())
->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
->addEntityFilter('product', $this->getProduct()->getId())
->setDateOrder();
$this->_reviewsCollection->getSelect()->limit(5);
}
return $this->_reviewsCollection;
}
/app/code/local/Mage/Review/Block/Product/View.php. with following code :-
Find the function getReviewsCollection() and replce with below function.
public function getReviewsCollection()
{
if (null === $this->_reviewsCollection) {
$this->_reviewsCollection = Mage::getModel('review/review')->getCollection()
->addStoreFilter(Mage::app()->getStore()->getId())
->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
->addEntityFilter('product', $this->getProduct()->getId())
->setDateOrder();
$this->_reviewsCollection->getSelect()->limit(5);
}
return $this->_reviewsCollection;
}
Hi,
ReplyDeleteAwesome Post.
Such this post is very informative.
Thanks for sharing with us.
Php Web Development Company Bangalore | Hire Website Developer India | Internet Marketing Company in Bangalore | Website Developers Bangalore