Route: /products/{slug}
Path Operation: product_detailsVariables#
| Variable | Type |
|---|
product | Product |
store | Store |
session | Session |
Product Properties#
| Property | Description |
|---|
product.id | Product ID |
product.name | Name |
product.slug | URL slug |
product.description | Full description (HTML) |
product.short_description | Brief description |
product.selected_product | Current variant |
product.selected_product.formatted_price | Price |
product.selected_product.formatted_sale_price | Sale price |
product.selected_product.quantity | Stock |
product.selected_product.in_stock | Availability |
product.selected_product.sku | SKU |
product.selected_product.media | Images/videos |
product.variants | Variants |
product.options | Options (size, color) |
product.rating | Rating |
product.reviews | Reviews |
product.questions | Q&A |
product.related_products | Related products |
product.bundle_offer | Bundle offer |
Bank Discounts#
To display available bank and card discounts on the product details page, include the Bank Discounts shared template:Place the Bank Discounts component above the product payment widgets:Bank Discounts require ZidPay. The component displays Bank Discount offers that the merchant has configured to appear on the product details page.If the component is not included, available Bank Discounts will not appear on the product details page.Example#
{% extends "layout.jinja" %}
{% block main_content %}
<h1>{{ product.name }}</h1>
{% if product.selected_product.media %}
<img src="{{ product.selected_product.media[0].image.full_size }}" alt="{{ product.name }}">
{% endif %}
<div class="price">
{% if product.selected_product.formatted_sale_price %}
<span>{{ product.selected_product.formatted_sale_price }}</span>
<del>{{ product.selected_product.formatted_price }}</del>
{% else %}
{{ product.selected_product.formatted_price }}
{% endif %}
</div>
{{ product.description | safe }}
{% include 'vitrin:products/variants_list.jinja' %}
{% include 'vitrin:shared/bank_discounts.jinja' %}
<button onclick="zid.cart.addProduct({form_id: 'product-form'})">
{{ _("Add to Cart") }}
</button>
{% endblock %}
Modified at 2026-08-20 10:27:57