Route: /products/{slug}/reviews
Path Operation: product_reviewsVariables#
| Variable | Type |
|---|
product | Product |
reviews | ReviewList |
store | Store |
session | Session |
Product Properties#
| Property | Description |
|---|
product.name | Product name |
product.slug | URL slug |
product.main_image | Main image |
product.rating | Rating object |
product.reviews | Paginated reviews |
Review Properties#
| Property | Description |
|---|
review.rating | Star rating (1-5) |
review.comment | Review text |
review.customer_name | Reviewer name |
review.images | Review images |
Example#
{% extends "layout.jinja" %}
{% block main_content %}
<a href="{{ url_for('product_details', slug=product.slug) }}">
<h1>{{ product.name }}</h1>
</a>
{% if product.rating %}
<div>{{ product.rating.average }} ({{ product.rating.total_count }})</div>
{% endif %}
{% for review in product.reviews.results %}
<div class="review">
<strong>{{ review.customer_name }}</strong>
<div>{{ review.rating }} stars</div>
<p>{{ review.comment }}</p>
</div>
{% endfor %}
{% include 'components/pagination.jinja' %}
{% endblock %}
Modified at 2026-02-17 07:02:10