VOOZH about

URL: https://deepwiki.com/MahoCommerce/maho/6.5-product-reviews-and-ratings

⇱ Product Reviews and Ratings | MahoCommerce/maho | DeepWiki


Loading...
Last indexed: 15 May 2026 (ea8ab8)
Menu

Product Reviews and Ratings

Purpose and Scope

This document details the technical implementation of the product review and rating system in Maho. It covers the data architecture of the Mage_Review and Mage_Rating modules, the frontend rendering pipeline using the base/default theme, the submission workflow utilizing HTML5 <dialog> elements, and the administrative moderation system.


System Architecture

The review system is decoupled into two primary modules: Mage_Review (handling text content and metadata) and Mage_Rating (handling numerical scores and criteria).

Code Entity Mapping

The following diagram maps high-level system components to their specific code entities and templates.


Sources:


Data Model and Storage

Maho uses a relational structure to separate review metadata from localized content and numerical ratings.

Entity Relationship


Sources:


Frontend Implementation

Review Summary Rendering

The summary is typically rendered in product listings or at the top of the product page. It calculates a percentage-based width for the star rating UI.

FunctionSourcePurpose
getRatingSummary()Mage_Review_Block_HelperReturns the aggregate percentage (e.g., 80 for 4 stars)
getReviewsCount()Mage_Review_Block_HelperReturns the total number of approved reviews

Template Logic: The UI uses a rating-box container where the inner rating div width is set dynamically based on the summary percentage app/design/frontend/base/default/template/review/helper/summary.phtml18 A shorter version is used for catalog grids and widgets app/design/frontend/base/default/template/review/helper/summary_short.phtml18-19 If no reviews exist, the system can optionally display a prompt to "Be the first to review this product" app/design/frontend/base/default/template/review/helper/summary.phtml25-27

Detailed Review List

The full list of reviews is handled by Mage_Review_Block_Product_View_List.

  1. Collection Loading: Loads reviews associated with the current product and store using getReviewsCollection() app/design/frontend/base/default/template/review/product/view/list.phtml15
  2. Vote Retrieval: Each review object contains a collection of RatingVotes accessed via $_review->getRatingVotes() app/design/frontend/base/default/template/review/product/view/list.phtml27
  3. UI Layout:

Sources:


Submission Workflow

Maho uses a modern HTML5 <dialog> based submission form to improve UX and reduce page reloads.

Sequence Diagram: Review Submission


Key Submission Components

Sources:


Moderation and Configuration

Review Statuses

Reviews are not visible on the frontend until approved by an administrator.

StatusCSV LabelFrontend Visibility
PendingPendingHidden (Default)
ApprovedApprovedVisible
Not ApprovedNot ApprovedHidden

Sources:

System Configuration

Administrators can control guest participation via the system configuration.

Localization

Review-related strings are managed via Mage_Review.csv. Key translations include:


Technical Data Retrieval

Detailed Ratings Block

The Mage_Rating_Block_Entity_Detailed block handles the retrieval of specific rating criteria (e.g., Quality, Price) for a product.

Sources: