Public Member Functions | |
getSummaryHtml ($product, $templateType, $displayIfNoReviews) | |
getRatingSummary () | |
getReviewsCount () | |
getReviewsUrl () | |
addTemplate ($type, $template) |
Definition at line 34 of file Helper.php.
addTemplate | ( | $ | type, | |
$ | template | |||
) |
Add an available template by type
It should be called before getSummaryHtml()
string | $type | |
string | $template |
Definition at line 86 of file Helper.php.
getRatingSummary | ( | ) |
getReviewsCount | ( | ) |
getReviewsUrl | ( | ) |
Definition at line 70 of file Helper.php.
00071 { 00072 return Mage::getUrl('review/product/list', array( 00073 'id' => $this->getProduct()->getId(), 00074 'category' => $this->getProduct()->getCategoryId() 00075 )); 00076 }
getSummaryHtml | ( | $ | product, | |
$ | templateType, | |||
$ | displayIfNoReviews | |||
) |
Definition at line 41 of file Helper.php.
00042 { 00043 // pick template among available 00044 if (empty($this->_availableTemplates[$templateType])) { 00045 $templateType = 'default'; 00046 } 00047 $this->setTemplate($this->_availableTemplates[$templateType]); 00048 00049 $this->setDisplayIfEmpty($displayIfNoReviews); 00050 00051 if (!$product->getRatingSummary()) { 00052 Mage::getModel('review/review') 00053 ->getEntitySummary($product, Mage::app()->getStore()->getId()); 00054 } 00055 $this->setProduct($product); 00056 00057 return $this->toHtml(); 00058 }