magento summary rating of customers review

magento summary rating of customers review

August 21, 2026 · Illustrated author avatarBy Stefan Bogdanescu
magento summary rating of customers review

Enhancing Magento Product Reviews: Displaying Summary Ratings

As an e-commerce merchant using Magento, you understand the importance of customer reviews for building trust and driving sales. However, you may find that the default review system lacks some key features. In this post, we’ll walk through how to enhance your product page by displaying a summary total rating for each product.

Understanding the Current Review System

In the default Magento setup, when customers leave a product review, they provide ratings and reviews for several attributes like quality, price, etc. These attribute-specific ratings are then displayed on the product page using stars.

The current system treats each rating as independent, which can make it difficult for shoppers to get a clear picture of the overall customer sentiment towards your products.

Your Goal: Displaying Summary Total Ratings

To address this, you want to calculate and display a summary total rating for each product. This total should be an average of all the ratings left by customers across different attributes. Moreover, you want this total to match the rating displayed on the product listing page for consistency.

Enhancing Magento to Display Summary Total Ratings

To achieve this, you’ll need to perform some modifications in your Magento theme and add a new field to the eav_attribute table.

Step 1: Add a New Field to eav_attribute Table

Add a new rating_sum field to the eav_attribute table. This field will hold the total rating sum for each product:

ALTER TABLE `eav_attribute` ADD COLUMN `rating_sum` INT(10) UNSIGNED NOT NULL DEFAULT 0;

Step 2: Update the Rating Sum on Review Submission

When a customer submits a new review, update the rating_sum field in the eav_attribute table. You can do this by overriding Magento’s Mage_Review_Model_Resource_Product_Collection::getRatingSummary() method.

public function getRatingSummary()
{
    $ratingSum = 0;
    foreach ($this->getItems() as $item) {
        $ratingSum += $item->getRatingSummary();
    }
    return $ratingSum / count($this->getItems());
}

Step 3: Display the Summary Rating on Product Page

To display the summary rating on the product page, you can modify your theme’s catalog/product/view.phtml template. Update the line where ratings are displayed to include a new div for the total rating:

<div class="rating-summary">
    <span class="rating-label">Rating Summary:</span>
    <span class="rating-average"><?php echo round($product->getRatingSummary(), 2) ?></span>
</div>

Conclusion: Enhancing Magento’s Review System

By following these steps, you can enhance your Magento store to display summary total ratings on the product page. This provides a more comprehensive view of customer sentiment and helps drive informed purchasing decisions.

Remember that this customization requires some knowledge of SQL queries and PHP scripting within the Magento environment. If you need further assistance with implementing this or other Magento enhancements, feel free to reach out to our team at Laravel Company.

Let us know if you have any questions or if there are specific Magento features you’d like us to cover in future posts!

Catalog Database Themes Customers

Our network