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 atextensions/productReviews/src/pages/frontStore/productView/ProductReviews.tsx:
ProductReviews.tsx
Component Features
Star Rating Component
TheStarRating component can be used in two modes:
- Display Mode
- Interactive Mode
Average Rating Calculation
Automatically calculates and displays the average rating: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:User Interface
Empty State
When no reviews exist:With Reviews
Styling
Uses Ana’s Suplements brand colors:Extension Structure
Configuration
Enabled inconfig/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
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)
Next Steps
Offline Payments
Learn about payment methods
Page Components
Create custom product page components