Skip to main content
Reviews allow customers to rate and review products. Shopper provides a flexible review system with approval workflows, rating calculations, and polymorphic relationships.

Model

The model used is Shopper\Core\Models\Review. It implements Shopper\Core\Models\Contracts\Review. Unlike products or brands, the Review model is not configurable via config/shopper/models.php and has no admin model wrapper. Products gain review capabilities through the InteractsWithReviews trait, which implements the Shopper\Core\Contracts\HasReviews interface. This is already applied to the Product model.

Database Schema

Relationships

Reviewrateable (Product)

Author (User)

HasReviews Contract

Products implement the HasReviews contract via the InteractsWithReviews trait:

Rating Methods

Getting Ratings

Rating Counts

Average Ratings

Rating Percentage

Creating Reviews

Via Product Model

Via Review Model

Direct Creation

Updating Reviews

Approval Management

Deleting Reviews

Retrieving Reviews

Configuration

Disabling Reviews

If your store doesn’t need product reviews, disable the feature in config/shopper/features.php:

Permissions

The admin panel generates five permissions for review management:

Components

To customize the admin UI for review management:
Creates config/shopper/components/review.php:

Storefront Example

Review Display

Review Submission

Review Management (Admin)

Blade Template Example

Use Cases