2
在我的Magento店的顧客正在審查我的產品在3個類別(即價格)。但是,當我打印這些評級只顯示摘要,而不是這3個基本分類(見代碼)。Magento的評論都出現了總結,評價,而不是評價項在PHP
<?php
//from http://www.exploremagento.com/magento/run-magento-code-outside-of-magento.php
require_once '../app/Mage.php';
umask(0);
Mage::app('default');
$review = Mage::getModel('review/review');
$collection = $review->getProductCollection();
$collection
->addAttributeToSelect('*')
->getSelect()
->limit(5)
->order('rand()');
$review->appendSummary($collection);
foreach($collection as $product) {
//var_dump($product->debug());
}
/* To get (what I assume is) 'star' rating. */
$ratingSummary = $product->getRatingSummary();
$starRating = $ratingSummary['rating_summary'];
echo $starRating . "<br/>";
?>
我怎樣才能得到全部的收視率,而不是總結?
你解決這個問題? – Anthony