Skip to main content

Overview

The Product Reviews extension adds a complete customer review system to your EverShop store. Customers can rate products with stars, write detailed reviews, and see reviews from other customers.

Features

  • 5-star rating system
  • Review submission form
  • Average rating calculation
  • Responsive design

Benefits

  • Build customer trust
  • Increase conversions
  • Gather product feedback
  • Social proof

Product Reviews Component

The main component is located at extensions/productReviews/src/pages/frontStore/productView/ProductReviews.tsx:
ProductReviews.tsx

Component Features

Star Rating Component

The StarRating component can be used in two modes:
Shows stars as read-only display

Average Rating Calculation

Automatically calculates and displays the average rating:
Displayed as: 4.5 de 5 (12 reseñas)

Review Submission Form

Collapsible form with three fields:
1

Customer Name

Required text input for reviewer’s name
2

Star Rating

Interactive star selector (1-5 stars)
3

Review Text

Multi-line textarea for detailed feedback

Review Display

Each review shows:
  • ⭐ Star rating visualization
  • 👤 Author name
  • 💬 Review comment
  • 📅 Submission date (formatted in Spanish)

Data Structure

GraphQL Integration

The component uses GraphQL to fetch product reviews:
The action field provides the URL for submitting new reviews via POST request.

Layout Configuration

The component is placed at the bottom of product pages:
This ensures reviews appear after product details and supplement information.

User Interface

Empty State

When no reviews exist:

With Reviews

Styling

Uses Ana’s Suplements brand colors:

Extension Structure

Configuration

Enabled in config/default.json:

State Management

The component uses React hooks for state management:

Form Handling

1

User clicks 'Escribir Reseña'

Form appears with default 5-star rating
2

User fills in name, adjusts rating, writes comment

State updates with each field change
3

User clicks 'Enviar Reseña'

Form submission handler processes the review
4

Form resets

Form hides and clears all fields

Best Practices

Moderation: Consider adding admin review moderation before publishing reviews publicly.
Verification: Implement purchase verification to ensure only real customers can review products.
Incentives: Consider offering loyalty points or discounts for leaving reviews to increase participation.

Internationalization

All text is currently in Spanish:
  • “Reseñas de Clientes” (Customer Reviews)
  • “Escribir Reseña” (Write Review)
  • “Nueva Reseña” (New Review)
  • “Tu Nombre” (Your Name)
  • “Calificación” (Rating)
  • “Tu Reseña” (Your Review)
  • “Sé el primero en reseñar este producto” (Be the first to review)
To support other languages, extract strings to translation files.

Next Steps

Offline Payments

Learn about payment methods

Page Components

Create custom product page components