I want to get the Price,Value and Quality rating values.For that i use review code but didn't get the specified values.

$reviewcollection = Mage::getModel('review/review')

I can use product id and customer id for this code. How can i get the rating like price -> 4,Value->5 etc.Thanks I am asking about the three fields (Quality,Price and Value) during review submission.

2 Answers 2


I found code for rating on reviews page.You can code it like this :

<?php   $reviewcollection = Mage::getModel('review/review')->getCollection()
        $_items = $reviewcollection;

<?php foreach ($_items as $_review):?>
                <a href="<?php echo $this->getReviewUrl($_review->getId()) ?>"><?php echo $this->htmlEscape($_review->getTitle()) ?></a> <?php echo $this->__('Review by <span>%s</span>', $this->htmlEscape($_review->getNickname())) ?>
                <?php $_votes = $_review->getRatingVotes();

                <?php if (count($_votes)): ?>
                <table class="ratings-table">
                    <col width="1" />
                    <col />
                        <?php foreach ($_votes as $_vote): ?>
                            <th><?php echo $this->escapeHtml($_vote->getRatingCode()) ?></th>
                                <div class="rating-box">
                                    <div class="rating" style="width:<?php echo $_vote->getPercent() ?>%;"></div>
                        <?php  endforeach; ?>
                <?php endif; ?>
                <?php echo nl2br($this->htmlEscape($_review->getDetail())) ?>
                <small class="date"><?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></small>

Are you expecting rating for the product price and product quantity?Please elaborate your question to understand

  • check my question now.Yes i am talking about Quality and price rating fields.
    – Adda
    Oct 16, 2014 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.