Review stars not showing on front-endRating is not showing on review blockNot display Front...

Stop and Take a Breath!

Why is the origin of “threshold” uncertain?

Was there a Viking Exchange as well as a Columbian one?

Killing undead fish underwater

Do I have an "anti-research" personality?

Why do Ichisongas hate elephants and hippos?

Why does my Photos library differ in size looking in Finder vs in the "Get Info" of Photos?

Can fracking help reduce CO2?

What's the polite way to say "I need to urinate"?

How to back up a running remote server?

What's the metal clinking sound at the end of credits in Avengers: Endgame?

Mysql fixing root password

Help, my Death Star suffers from Kessler syndrome!

Is creating your own "experiment" considered cheating during a physics exam?

What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?

Alternatives to Overleaf

Where did the extra Pym particles come from in Endgame?

Lock in SQL Server and Oracle

OpenRailway Map basemap in QGIS

What was the "glowing package" Pym was expecting?

Pressure to defend the relevance of one's area of mathematics

Was it really necessary for the Lunar Module to have 2 stages?

How does a swashbuckler fight with two weapons and safely dart away?

What is the difference between `a[bc]d` (brackets) and `a{b,c}d` (braces)?



Review stars not showing on front-end


Rating is not showing on review blockNot display Front end“product-review-table” is not showing in review formProduct Attribute not showing on the Front EndRatings stars image are not displayingMagento 2 Review / Ratings Stars ICONS are not correct showing in frontpageGet product review starsAOE Scheduler not showing on front-endShowing Review Summary on Category PageDisplay Pending Review in Product review






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















I'm using a custom template on my magento site and I've got everything working but star ratings are not showing on the site's homepage (The one that displays latest and featured product). Its also not showing on recently seen items on side bar and also related products but it is showing on category pages and on product individual pages.



Can someone please explain what I need to do?



Appreciate your response(S). Below is the code;



<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<div class="category-products">
<?php // Grid Mode ?>

<?php $_collectionSize = $_productCollection->count() ?>
<?php
$_columnCount = $this->getColumnCount();
if(!$_columnCount)
$_columnCount = 4;
?>
<ul class="products-grid columns<?php echo $_columnCount; ?>">
<?php $i=0; foreach ($_productCollection as $_product): ?>
<li class="item"><div class="item-area">
<div class="product-image-area">
<?php
if( Mage::getStoreConfig("quickview/general/enableview", $code) ){
$base_url = $this->getUrl();
if(strpos($base_url,'?')!==false)
$base_url = explode("?",$this->getUrl());
if(is_array($base_url))
$base_url = $base_url[0];
// if(strpos($base_url,'index.php')!==false){
// $base_url = str_replace('index.php/','',$base_url);
// $base_url .= "index.php/quickview/index/view/";
// }else{
// $base_url .= "quickview/index/view/";
// }
$base_url .= "quickview/index/view/";
$quickview_url = $base_url."id/".$_product->getId();
?>
<a href="<?php echo $quickview_url; ?>" class="quickview-icon"><i class="icon-export"></i><span><?php echo $this->__("Quick View"); ?></span></a>
<?php
}
?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<?php
if(Mage::getStoreConfig("porto_settings/category/alternative_image", $code)){
?>
<img class="defaultImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<img class="hoverImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'thumbnail'), null, true) ?>"/>
<?php
} else {
?>
<img src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<?php
}
?>
</a>
<?php
// Get the Special Price
$specialprice = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
// Get the Special Price FROM date
$specialPriceFromDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialFromDate();
// Get the Special Price TO date
$specialPriceToDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialToDate();
// Get Current date
$today = time();

if ($specialprice){
if($today >= strtotime( $specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime( $specialPriceFromDate) && is_null($specialPriceToDate)){
if(Mage::getStoreConfig("porto_settings/product_label/sale", $code)){
?>
<div class="product-label" style="right: 10px;"><span class="sale-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/sale_label_text", $code);?></span></div>
<?php
}
}
}
?>
<?php
$now = date("Y-m-d");
$newsFrom= substr($_product->getData('news_from_date'),0,10);
$newsTo= substr($_product->getData('news_to_date'),0,10);
if ($newsTo != '' || $newsFrom != ''){
if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo))
{
if(Mage::getStoreConfig("porto_settings/product_label/new", $code)){
?>
<div class="product-label" style="left: 10px;"><span class="new-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/new_label_text", $code);?></span></div>
<?php
}
}
}
?>
</div>
<div class="details-area">
<h2 class="product-name">
<a title="<?php echo $this->htmlEscape($_product->getName()) ?>" href="<?php echo $_product->getProductUrl() ?>">
<?php
if (strlen($_product->getName()) > 24) :
echo strip_tags(substr($_product->getName(), 0, 20)).'...';
else :
echo $_product->getName();
endif;
?>
</a>
</h2>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
if($_product->getRatingSummary()):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($_product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
endif;
endif;
?>
<?php echo $this->getPriceHtml($_product, true) ?>
<div class="actions">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxWishlist('<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $this->helper('wishlist')->getAddUrl($_product) ?><?php endif; ?>" class="addtowishlist" title="<?php echo $this->__('Add to Wishlist') ?>"><i class="icon-wishlist"></i></a>
<?php endif; ?>
<?php if($_product->isSaleable()): ?>
<?php if ( !($_product->getData('has_options') || $_product->isGrouped()) ) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<?php else : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:showOptions('<?php echo $_product->getId()?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<a href='<?php echo $this->getUrl('ajaxcart/index/options',array('product_id'=>$_product->getId()));?>' class='fancybox' id='fancybox<?php echo $_product->getId()?>' style='display:none'>Options</a>
<?php endif;?>
<?php else: ?>
<a href="javascript:void(0);" class="addtocart outofstock" title="<?php echo $this->__('Out of stock') ?>"><?php echo $this->__('Out of stock') ?></span></a>
<?php endif; ?>
<?php if(Mage::getStoreConfig("porto_settings/category/compare", $code) && $_compareUrl=$this->getAddToCompareUrl($_product)): ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxCompare('<?php echo $_compareUrl ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $_compareUrl ?><?php endif; ?>" class="comparelink" title="<?php echo $this->__('Add to Compare') ?>"><i class="icon-compare"></i></a>
<?php endif; ?>
<div class="clearer"></div>
</div>
</div>
</div></li>
<?php endforeach ?>
</ul>
<script type="text/javascript">
jQuery('.col-main .products-grid li:nth-child(2n)').addClass('nth-child-2n');
jQuery('.col-main .products-grid li:nth-child(2n+1)').addClass('nth-child-2np1');
jQuery('.col-main .products-grid li:nth-child(3n)').addClass('nth-child-3n');
jQuery('.col-main .products-grid li:nth-child(3n+1)').addClass('nth-child-3np1');
jQuery('.col-main .products-grid li:nth-child(4n)').addClass('nth-child-4n');
jQuery('.col-main .products-grid li:nth-child(4n+1)').addClass('nth-child-4np1');
jQuery('.col-main .products-grid li:nth-child(5n)').addClass('nth-child-5n');
jQuery('.col-main .products-grid li:nth-child(5n+1)').addClass('nth-child-5np1');
jQuery('.col-main .products-grid li:nth-child(6n)').addClass('nth-child-6n');
jQuery('.col-main .products-grid li:nth-child(6n+1)').addClass('nth-child-6np1');
jQuery('.col-main .products-grid li:nth-child(7n)').addClass('nth-child-7n');
jQuery('.col-main .products-grid li:nth-child(7n+1)').addClass('nth-child-7np1');
jQuery('.col-main .products-grid li:nth-child(8n)').addClass('nth-child-8n');
jQuery('.col-main .products-grid li:nth-child(8n+1)').addClass('nth-child-8np1');
</script>
</div>
<?php endif; ?>









share|improve this question
















bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • share your code

    – Qaisar Satti
    Oct 15 '15 at 9:58











  • Thank you Qaisar. I've updated my question so the code can be displayed properly.

    – Jahswey
    Oct 15 '15 at 13:13




















3















I'm using a custom template on my magento site and I've got everything working but star ratings are not showing on the site's homepage (The one that displays latest and featured product). Its also not showing on recently seen items on side bar and also related products but it is showing on category pages and on product individual pages.



Can someone please explain what I need to do?



Appreciate your response(S). Below is the code;



<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<div class="category-products">
<?php // Grid Mode ?>

<?php $_collectionSize = $_productCollection->count() ?>
<?php
$_columnCount = $this->getColumnCount();
if(!$_columnCount)
$_columnCount = 4;
?>
<ul class="products-grid columns<?php echo $_columnCount; ?>">
<?php $i=0; foreach ($_productCollection as $_product): ?>
<li class="item"><div class="item-area">
<div class="product-image-area">
<?php
if( Mage::getStoreConfig("quickview/general/enableview", $code) ){
$base_url = $this->getUrl();
if(strpos($base_url,'?')!==false)
$base_url = explode("?",$this->getUrl());
if(is_array($base_url))
$base_url = $base_url[0];
// if(strpos($base_url,'index.php')!==false){
// $base_url = str_replace('index.php/','',$base_url);
// $base_url .= "index.php/quickview/index/view/";
// }else{
// $base_url .= "quickview/index/view/";
// }
$base_url .= "quickview/index/view/";
$quickview_url = $base_url."id/".$_product->getId();
?>
<a href="<?php echo $quickview_url; ?>" class="quickview-icon"><i class="icon-export"></i><span><?php echo $this->__("Quick View"); ?></span></a>
<?php
}
?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<?php
if(Mage::getStoreConfig("porto_settings/category/alternative_image", $code)){
?>
<img class="defaultImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<img class="hoverImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'thumbnail'), null, true) ?>"/>
<?php
} else {
?>
<img src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<?php
}
?>
</a>
<?php
// Get the Special Price
$specialprice = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
// Get the Special Price FROM date
$specialPriceFromDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialFromDate();
// Get the Special Price TO date
$specialPriceToDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialToDate();
// Get Current date
$today = time();

if ($specialprice){
if($today >= strtotime( $specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime( $specialPriceFromDate) && is_null($specialPriceToDate)){
if(Mage::getStoreConfig("porto_settings/product_label/sale", $code)){
?>
<div class="product-label" style="right: 10px;"><span class="sale-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/sale_label_text", $code);?></span></div>
<?php
}
}
}
?>
<?php
$now = date("Y-m-d");
$newsFrom= substr($_product->getData('news_from_date'),0,10);
$newsTo= substr($_product->getData('news_to_date'),0,10);
if ($newsTo != '' || $newsFrom != ''){
if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo))
{
if(Mage::getStoreConfig("porto_settings/product_label/new", $code)){
?>
<div class="product-label" style="left: 10px;"><span class="new-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/new_label_text", $code);?></span></div>
<?php
}
}
}
?>
</div>
<div class="details-area">
<h2 class="product-name">
<a title="<?php echo $this->htmlEscape($_product->getName()) ?>" href="<?php echo $_product->getProductUrl() ?>">
<?php
if (strlen($_product->getName()) > 24) :
echo strip_tags(substr($_product->getName(), 0, 20)).'...';
else :
echo $_product->getName();
endif;
?>
</a>
</h2>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
if($_product->getRatingSummary()):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($_product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
endif;
endif;
?>
<?php echo $this->getPriceHtml($_product, true) ?>
<div class="actions">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxWishlist('<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $this->helper('wishlist')->getAddUrl($_product) ?><?php endif; ?>" class="addtowishlist" title="<?php echo $this->__('Add to Wishlist') ?>"><i class="icon-wishlist"></i></a>
<?php endif; ?>
<?php if($_product->isSaleable()): ?>
<?php if ( !($_product->getData('has_options') || $_product->isGrouped()) ) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<?php else : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:showOptions('<?php echo $_product->getId()?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<a href='<?php echo $this->getUrl('ajaxcart/index/options',array('product_id'=>$_product->getId()));?>' class='fancybox' id='fancybox<?php echo $_product->getId()?>' style='display:none'>Options</a>
<?php endif;?>
<?php else: ?>
<a href="javascript:void(0);" class="addtocart outofstock" title="<?php echo $this->__('Out of stock') ?>"><?php echo $this->__('Out of stock') ?></span></a>
<?php endif; ?>
<?php if(Mage::getStoreConfig("porto_settings/category/compare", $code) && $_compareUrl=$this->getAddToCompareUrl($_product)): ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxCompare('<?php echo $_compareUrl ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $_compareUrl ?><?php endif; ?>" class="comparelink" title="<?php echo $this->__('Add to Compare') ?>"><i class="icon-compare"></i></a>
<?php endif; ?>
<div class="clearer"></div>
</div>
</div>
</div></li>
<?php endforeach ?>
</ul>
<script type="text/javascript">
jQuery('.col-main .products-grid li:nth-child(2n)').addClass('nth-child-2n');
jQuery('.col-main .products-grid li:nth-child(2n+1)').addClass('nth-child-2np1');
jQuery('.col-main .products-grid li:nth-child(3n)').addClass('nth-child-3n');
jQuery('.col-main .products-grid li:nth-child(3n+1)').addClass('nth-child-3np1');
jQuery('.col-main .products-grid li:nth-child(4n)').addClass('nth-child-4n');
jQuery('.col-main .products-grid li:nth-child(4n+1)').addClass('nth-child-4np1');
jQuery('.col-main .products-grid li:nth-child(5n)').addClass('nth-child-5n');
jQuery('.col-main .products-grid li:nth-child(5n+1)').addClass('nth-child-5np1');
jQuery('.col-main .products-grid li:nth-child(6n)').addClass('nth-child-6n');
jQuery('.col-main .products-grid li:nth-child(6n+1)').addClass('nth-child-6np1');
jQuery('.col-main .products-grid li:nth-child(7n)').addClass('nth-child-7n');
jQuery('.col-main .products-grid li:nth-child(7n+1)').addClass('nth-child-7np1');
jQuery('.col-main .products-grid li:nth-child(8n)').addClass('nth-child-8n');
jQuery('.col-main .products-grid li:nth-child(8n+1)').addClass('nth-child-8np1');
</script>
</div>
<?php endif; ?>









share|improve this question
















bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • share your code

    – Qaisar Satti
    Oct 15 '15 at 9:58











  • Thank you Qaisar. I've updated my question so the code can be displayed properly.

    – Jahswey
    Oct 15 '15 at 13:13
















3












3








3


0






I'm using a custom template on my magento site and I've got everything working but star ratings are not showing on the site's homepage (The one that displays latest and featured product). Its also not showing on recently seen items on side bar and also related products but it is showing on category pages and on product individual pages.



Can someone please explain what I need to do?



Appreciate your response(S). Below is the code;



<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<div class="category-products">
<?php // Grid Mode ?>

<?php $_collectionSize = $_productCollection->count() ?>
<?php
$_columnCount = $this->getColumnCount();
if(!$_columnCount)
$_columnCount = 4;
?>
<ul class="products-grid columns<?php echo $_columnCount; ?>">
<?php $i=0; foreach ($_productCollection as $_product): ?>
<li class="item"><div class="item-area">
<div class="product-image-area">
<?php
if( Mage::getStoreConfig("quickview/general/enableview", $code) ){
$base_url = $this->getUrl();
if(strpos($base_url,'?')!==false)
$base_url = explode("?",$this->getUrl());
if(is_array($base_url))
$base_url = $base_url[0];
// if(strpos($base_url,'index.php')!==false){
// $base_url = str_replace('index.php/','',$base_url);
// $base_url .= "index.php/quickview/index/view/";
// }else{
// $base_url .= "quickview/index/view/";
// }
$base_url .= "quickview/index/view/";
$quickview_url = $base_url."id/".$_product->getId();
?>
<a href="<?php echo $quickview_url; ?>" class="quickview-icon"><i class="icon-export"></i><span><?php echo $this->__("Quick View"); ?></span></a>
<?php
}
?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<?php
if(Mage::getStoreConfig("porto_settings/category/alternative_image", $code)){
?>
<img class="defaultImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<img class="hoverImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'thumbnail'), null, true) ?>"/>
<?php
} else {
?>
<img src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<?php
}
?>
</a>
<?php
// Get the Special Price
$specialprice = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
// Get the Special Price FROM date
$specialPriceFromDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialFromDate();
// Get the Special Price TO date
$specialPriceToDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialToDate();
// Get Current date
$today = time();

if ($specialprice){
if($today >= strtotime( $specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime( $specialPriceFromDate) && is_null($specialPriceToDate)){
if(Mage::getStoreConfig("porto_settings/product_label/sale", $code)){
?>
<div class="product-label" style="right: 10px;"><span class="sale-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/sale_label_text", $code);?></span></div>
<?php
}
}
}
?>
<?php
$now = date("Y-m-d");
$newsFrom= substr($_product->getData('news_from_date'),0,10);
$newsTo= substr($_product->getData('news_to_date'),0,10);
if ($newsTo != '' || $newsFrom != ''){
if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo))
{
if(Mage::getStoreConfig("porto_settings/product_label/new", $code)){
?>
<div class="product-label" style="left: 10px;"><span class="new-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/new_label_text", $code);?></span></div>
<?php
}
}
}
?>
</div>
<div class="details-area">
<h2 class="product-name">
<a title="<?php echo $this->htmlEscape($_product->getName()) ?>" href="<?php echo $_product->getProductUrl() ?>">
<?php
if (strlen($_product->getName()) > 24) :
echo strip_tags(substr($_product->getName(), 0, 20)).'...';
else :
echo $_product->getName();
endif;
?>
</a>
</h2>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
if($_product->getRatingSummary()):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($_product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
endif;
endif;
?>
<?php echo $this->getPriceHtml($_product, true) ?>
<div class="actions">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxWishlist('<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $this->helper('wishlist')->getAddUrl($_product) ?><?php endif; ?>" class="addtowishlist" title="<?php echo $this->__('Add to Wishlist') ?>"><i class="icon-wishlist"></i></a>
<?php endif; ?>
<?php if($_product->isSaleable()): ?>
<?php if ( !($_product->getData('has_options') || $_product->isGrouped()) ) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<?php else : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:showOptions('<?php echo $_product->getId()?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<a href='<?php echo $this->getUrl('ajaxcart/index/options',array('product_id'=>$_product->getId()));?>' class='fancybox' id='fancybox<?php echo $_product->getId()?>' style='display:none'>Options</a>
<?php endif;?>
<?php else: ?>
<a href="javascript:void(0);" class="addtocart outofstock" title="<?php echo $this->__('Out of stock') ?>"><?php echo $this->__('Out of stock') ?></span></a>
<?php endif; ?>
<?php if(Mage::getStoreConfig("porto_settings/category/compare", $code) && $_compareUrl=$this->getAddToCompareUrl($_product)): ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxCompare('<?php echo $_compareUrl ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $_compareUrl ?><?php endif; ?>" class="comparelink" title="<?php echo $this->__('Add to Compare') ?>"><i class="icon-compare"></i></a>
<?php endif; ?>
<div class="clearer"></div>
</div>
</div>
</div></li>
<?php endforeach ?>
</ul>
<script type="text/javascript">
jQuery('.col-main .products-grid li:nth-child(2n)').addClass('nth-child-2n');
jQuery('.col-main .products-grid li:nth-child(2n+1)').addClass('nth-child-2np1');
jQuery('.col-main .products-grid li:nth-child(3n)').addClass('nth-child-3n');
jQuery('.col-main .products-grid li:nth-child(3n+1)').addClass('nth-child-3np1');
jQuery('.col-main .products-grid li:nth-child(4n)').addClass('nth-child-4n');
jQuery('.col-main .products-grid li:nth-child(4n+1)').addClass('nth-child-4np1');
jQuery('.col-main .products-grid li:nth-child(5n)').addClass('nth-child-5n');
jQuery('.col-main .products-grid li:nth-child(5n+1)').addClass('nth-child-5np1');
jQuery('.col-main .products-grid li:nth-child(6n)').addClass('nth-child-6n');
jQuery('.col-main .products-grid li:nth-child(6n+1)').addClass('nth-child-6np1');
jQuery('.col-main .products-grid li:nth-child(7n)').addClass('nth-child-7n');
jQuery('.col-main .products-grid li:nth-child(7n+1)').addClass('nth-child-7np1');
jQuery('.col-main .products-grid li:nth-child(8n)').addClass('nth-child-8n');
jQuery('.col-main .products-grid li:nth-child(8n+1)').addClass('nth-child-8np1');
</script>
</div>
<?php endif; ?>









share|improve this question
















I'm using a custom template on my magento site and I've got everything working but star ratings are not showing on the site's homepage (The one that displays latest and featured product). Its also not showing on recently seen items on side bar and also related products but it is showing on category pages and on product individual pages.



Can someone please explain what I need to do?



Appreciate your response(S). Below is the code;



<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<div class="category-products">
<?php // Grid Mode ?>

<?php $_collectionSize = $_productCollection->count() ?>
<?php
$_columnCount = $this->getColumnCount();
if(!$_columnCount)
$_columnCount = 4;
?>
<ul class="products-grid columns<?php echo $_columnCount; ?>">
<?php $i=0; foreach ($_productCollection as $_product): ?>
<li class="item"><div class="item-area">
<div class="product-image-area">
<?php
if( Mage::getStoreConfig("quickview/general/enableview", $code) ){
$base_url = $this->getUrl();
if(strpos($base_url,'?')!==false)
$base_url = explode("?",$this->getUrl());
if(is_array($base_url))
$base_url = $base_url[0];
// if(strpos($base_url,'index.php')!==false){
// $base_url = str_replace('index.php/','',$base_url);
// $base_url .= "index.php/quickview/index/view/";
// }else{
// $base_url .= "quickview/index/view/";
// }
$base_url .= "quickview/index/view/";
$quickview_url = $base_url."id/".$_product->getId();
?>
<a href="<?php echo $quickview_url; ?>" class="quickview-icon"><i class="icon-export"></i><span><?php echo $this->__("Quick View"); ?></span></a>
<?php
}
?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<?php
if(Mage::getStoreConfig("porto_settings/category/alternative_image", $code)){
?>
<img class="defaultImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<img class="hoverImage" src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'thumbnail'), null, true) ?>"/>
<?php
} else {
?>
<img src="<?php if(Mage::getStoreConfig("porto_settings/category/aspect_ratio",$code)):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(250);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(Mage::getStoreConfig("porto_settings/category/ratio_width",$code),Mage::getStoreConfig("porto_settings/category/ratio_height",$code)); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
<?php
}
?>
</a>
<?php
// Get the Special Price
$specialprice = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
// Get the Special Price FROM date
$specialPriceFromDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialFromDate();
// Get the Special Price TO date
$specialPriceToDate = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialToDate();
// Get Current date
$today = time();

if ($specialprice){
if($today >= strtotime( $specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime( $specialPriceFromDate) && is_null($specialPriceToDate)){
if(Mage::getStoreConfig("porto_settings/product_label/sale", $code)){
?>
<div class="product-label" style="right: 10px;"><span class="sale-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/sale_label_text", $code);?></span></div>
<?php
}
}
}
?>
<?php
$now = date("Y-m-d");
$newsFrom= substr($_product->getData('news_from_date'),0,10);
$newsTo= substr($_product->getData('news_to_date'),0,10);
if ($newsTo != '' || $newsFrom != ''){
if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo))
{
if(Mage::getStoreConfig("porto_settings/product_label/new", $code)){
?>
<div class="product-label" style="left: 10px;"><span class="new-product-icon"><?php echo Mage::getStoreConfig("porto_settings/product_label/new_label_text", $code);?></span></div>
<?php
}
}
}
?>
</div>
<div class="details-area">
<h2 class="product-name">
<a title="<?php echo $this->htmlEscape($_product->getName()) ?>" href="<?php echo $_product->getProductUrl() ?>">
<?php
if (strlen($_product->getName()) > 24) :
echo strip_tags(substr($_product->getName(), 0, 20)).'...';
else :
echo $_product->getName();
endif;
?>
</a>
</h2>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
if($_product->getRatingSummary()):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($_product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
endif;
endif;
?>
<?php echo $this->getPriceHtml($_product, true) ?>
<div class="actions">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxWishlist('<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $this->helper('wishlist')->getAddUrl($_product) ?><?php endif; ?>" class="addtowishlist" title="<?php echo $this->__('Add to Wishlist') ?>"><i class="icon-wishlist"></i></a>
<?php endif; ?>
<?php if($_product->isSaleable()): ?>
<?php if ( !($_product->getData('has_options') || $_product->isGrouped()) ) : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<?php else : ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>javascript:showOptions('<?php echo $_product->getId()?>')<?php else: ?><?php echo $this->getAddToCartUrl($_product) ?><?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"><i class="icon-cart"></i><span>&nbsp;<?php echo $this->__('Add to Cart') ?></span></a>
<a href='<?php echo $this->getUrl('ajaxcart/index/options',array('product_id'=>$_product->getId()));?>' class='fancybox' id='fancybox<?php echo $_product->getId()?>' style='display:none'>Options</a>
<?php endif;?>
<?php else: ?>
<a href="javascript:void(0);" class="addtocart outofstock" title="<?php echo $this->__('Out of stock') ?>"><?php echo $this->__('Out of stock') ?></span></a>
<?php endif; ?>
<?php if(Mage::getStoreConfig("porto_settings/category/compare", $code) && $_compareUrl=$this->getAddToCompareUrl($_product)): ?>
<a href="<?php if(Mage::getStoreConfig("ajaxcart/addtolinks/enablecategory", $code)):?>javascript:ajaxCompare('<?php echo $_compareUrl ?>','<?php echo $_product->getId()?>');<?php else: ?><?php echo $_compareUrl ?><?php endif; ?>" class="comparelink" title="<?php echo $this->__('Add to Compare') ?>"><i class="icon-compare"></i></a>
<?php endif; ?>
<div class="clearer"></div>
</div>
</div>
</div></li>
<?php endforeach ?>
</ul>
<script type="text/javascript">
jQuery('.col-main .products-grid li:nth-child(2n)').addClass('nth-child-2n');
jQuery('.col-main .products-grid li:nth-child(2n+1)').addClass('nth-child-2np1');
jQuery('.col-main .products-grid li:nth-child(3n)').addClass('nth-child-3n');
jQuery('.col-main .products-grid li:nth-child(3n+1)').addClass('nth-child-3np1');
jQuery('.col-main .products-grid li:nth-child(4n)').addClass('nth-child-4n');
jQuery('.col-main .products-grid li:nth-child(4n+1)').addClass('nth-child-4np1');
jQuery('.col-main .products-grid li:nth-child(5n)').addClass('nth-child-5n');
jQuery('.col-main .products-grid li:nth-child(5n+1)').addClass('nth-child-5np1');
jQuery('.col-main .products-grid li:nth-child(6n)').addClass('nth-child-6n');
jQuery('.col-main .products-grid li:nth-child(6n+1)').addClass('nth-child-6np1');
jQuery('.col-main .products-grid li:nth-child(7n)').addClass('nth-child-7n');
jQuery('.col-main .products-grid li:nth-child(7n+1)').addClass('nth-child-7np1');
jQuery('.col-main .products-grid li:nth-child(8n)').addClass('nth-child-8n');
jQuery('.col-main .products-grid li:nth-child(8n+1)').addClass('nth-child-8np1');
</script>
</div>
<?php endif; ?>






magento-1.9 review home-page product-review customize






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 22 '18 at 6:08









MGento

1,237319




1,237319










asked Oct 15 '15 at 9:51









JahsweyJahswey

509




509





bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • share your code

    – Qaisar Satti
    Oct 15 '15 at 9:58











  • Thank you Qaisar. I've updated my question so the code can be displayed properly.

    – Jahswey
    Oct 15 '15 at 13:13





















  • share your code

    – Qaisar Satti
    Oct 15 '15 at 9:58











  • Thank you Qaisar. I've updated my question so the code can be displayed properly.

    – Jahswey
    Oct 15 '15 at 13:13



















share your code

– Qaisar Satti
Oct 15 '15 at 9:58





share your code

– Qaisar Satti
Oct 15 '15 at 9:58













Thank you Qaisar. I've updated my question so the code can be displayed properly.

– Jahswey
Oct 15 '15 at 13:13







Thank you Qaisar. I've updated my question so the code can be displayed properly.

– Jahswey
Oct 15 '15 at 13:13












1 Answer
1






active

oldest

votes


















0














replace this



$review_html = $this->getReviewsSummaryHtml($_product, 'short'); 


with



$reviewHelper = $this->getLayout()->createBlock('review/helper');
echo $reviewHelper->getSummaryHtml($_product, 'short', true);


OR



you can use this for rating



$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($_product->getId());

if ($summaryData['rating_summary']):?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:<?php echo $summaryData['rating_summary']; ?>%"></div>
</div>
</div>
<?php endif; ?>





share|improve this answer
























  • Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

    – Jahswey
    Oct 18 '15 at 16:13











  • second option always work in every condition. check print_r($summaryData); give you what output?

    – Qaisar Satti
    Oct 18 '15 at 16:15











  • It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

    – circlesix
    Jul 2 '17 at 3:50











  • This answer should work

    – Kalyan Chakravarthi V
    Feb 21 '18 at 19:01












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f86540%2freview-stars-not-showing-on-front-end%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














replace this



$review_html = $this->getReviewsSummaryHtml($_product, 'short'); 


with



$reviewHelper = $this->getLayout()->createBlock('review/helper');
echo $reviewHelper->getSummaryHtml($_product, 'short', true);


OR



you can use this for rating



$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($_product->getId());

if ($summaryData['rating_summary']):?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:<?php echo $summaryData['rating_summary']; ?>%"></div>
</div>
</div>
<?php endif; ?>





share|improve this answer
























  • Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

    – Jahswey
    Oct 18 '15 at 16:13











  • second option always work in every condition. check print_r($summaryData); give you what output?

    – Qaisar Satti
    Oct 18 '15 at 16:15











  • It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

    – circlesix
    Jul 2 '17 at 3:50











  • This answer should work

    – Kalyan Chakravarthi V
    Feb 21 '18 at 19:01
















0














replace this



$review_html = $this->getReviewsSummaryHtml($_product, 'short'); 


with



$reviewHelper = $this->getLayout()->createBlock('review/helper');
echo $reviewHelper->getSummaryHtml($_product, 'short', true);


OR



you can use this for rating



$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($_product->getId());

if ($summaryData['rating_summary']):?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:<?php echo $summaryData['rating_summary']; ?>%"></div>
</div>
</div>
<?php endif; ?>





share|improve this answer
























  • Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

    – Jahswey
    Oct 18 '15 at 16:13











  • second option always work in every condition. check print_r($summaryData); give you what output?

    – Qaisar Satti
    Oct 18 '15 at 16:15











  • It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

    – circlesix
    Jul 2 '17 at 3:50











  • This answer should work

    – Kalyan Chakravarthi V
    Feb 21 '18 at 19:01














0












0








0







replace this



$review_html = $this->getReviewsSummaryHtml($_product, 'short'); 


with



$reviewHelper = $this->getLayout()->createBlock('review/helper');
echo $reviewHelper->getSummaryHtml($_product, 'short', true);


OR



you can use this for rating



$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($_product->getId());

if ($summaryData['rating_summary']):?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:<?php echo $summaryData['rating_summary']; ?>%"></div>
</div>
</div>
<?php endif; ?>





share|improve this answer













replace this



$review_html = $this->getReviewsSummaryHtml($_product, 'short'); 


with



$reviewHelper = $this->getLayout()->createBlock('review/helper');
echo $reviewHelper->getSummaryHtml($_product, 'short', true);


OR



you can use this for rating



$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')
->setStoreId($storeId)
->load($_product->getId());

if ($summaryData['rating_summary']):?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:<?php echo $summaryData['rating_summary']; ?>%"></div>
</div>
</div>
<?php endif; ?>






share|improve this answer












share|improve this answer



share|improve this answer










answered Oct 16 '15 at 7:56









Qaisar SattiQaisar Satti

27.2k1258110




27.2k1258110













  • Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

    – Jahswey
    Oct 18 '15 at 16:13











  • second option always work in every condition. check print_r($summaryData); give you what output?

    – Qaisar Satti
    Oct 18 '15 at 16:15











  • It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

    – circlesix
    Jul 2 '17 at 3:50











  • This answer should work

    – Kalyan Chakravarthi V
    Feb 21 '18 at 19:01



















  • Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

    – Jahswey
    Oct 18 '15 at 16:13











  • second option always work in every condition. check print_r($summaryData); give you what output?

    – Qaisar Satti
    Oct 18 '15 at 16:15











  • It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

    – circlesix
    Jul 2 '17 at 3:50











  • This answer should work

    – Kalyan Chakravarthi V
    Feb 21 '18 at 19:01

















Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

– Jahswey
Oct 18 '15 at 16:13





Hi Qaisar, thanks for the support. but I tried using both options, none of them worked

– Jahswey
Oct 18 '15 at 16:13













second option always work in every condition. check print_r($summaryData); give you what output?

– Qaisar Satti
Oct 18 '15 at 16:15





second option always work in every condition. check print_r($summaryData); give you what output?

– Qaisar Satti
Oct 18 '15 at 16:15













It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

– circlesix
Jul 2 '17 at 3:50





It could be an issue with the wrong template being rendered on the page. What you checked with template hints to make sure you are editing the right files?

– circlesix
Jul 2 '17 at 3:50













This answer should work

– Kalyan Chakravarthi V
Feb 21 '18 at 19:01





This answer should work

– Kalyan Chakravarthi V
Feb 21 '18 at 19:01


















draft saved

draft discarded




















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f86540%2freview-stars-not-showing-on-front-end%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

“%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

夢乃愛華...