How to get Magento Review, just average reviews no HTML -


i have been using

if ($product->getratingsummary()):     echo $this->getreviewssummaryhtml($product); endif; 

but returns html reviews. problem variable $this not accessible inside function. there way reviews value (not whole html) without using $this variable , giving product id?

if check getsummaryhtml method of mage_review_block_helper, idea how magento calculate review summary.

you can use below code current product object $_product set rating summary in product object.

mage::getmodel('review/review')->getentitysummary($_product, mage::app()->getstore()->getid()); 

after can fetch summary using below method:

echo $_product->getratingsummary()->getratingsummary(); echo $_product->getratingsummary()->getreviewscount(); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -