{% extends "oscar/catalogue/detail.html" %} {% load history_tags currency_filters reviews_tags staticfiles product_tags display_tags i18n purchase_info_tags ocyanjson wagtailcore_tags wishlist_tags l10n %} {% block extrascripts %} {{ block.super }} {% endblock %} {% block imports %} {{block.super}} {% endblock %} {% block header_title %} {{product.get_title}} {% endblock %} {% block header_breadcrumbs %} {% endblock %} {% block content %} {% purchase_info_for_product request product as session %}
{% get_back_button as backbutton %} {% if backbutton %} {% endif %} {% block product_gallery %}
{% include "catalogue/partials/gallery.html" %}
{% endblock %} {% block product_main %}
{% comment %} This is a but clunky here. Better to have some kind of JS-driven dashboard menu that pops out when clicked. A bit like the Django-Debug-Toolbar button {% endcomment %} {% if user.is_staff %} {% endif %} {% block product_stock_record %} {% include "catalogue/partials/stock_record.html" with verbose=1 %} {% purchase_info_for_product request product as session %} {% if session.availability.is_available_to_buy %} {% if session.stockrecord.is_below_threshold %}
{{session.availability.message}}
{% else %}
{{session.availability.message}}
{% endif %} {% else %}
{{session.availability.message}}
{% endif %} {% iffeature "reviews" %}
({{product.num_approved_reviews}})
{% endiffeature %} {% endblock product_stock_record %} {% block product_description %} {% if product.description %}
{{ product.description|richtext }}
{% endif %} {% endblock product_description %} {% block product_basket_form %}
{{ block.super }}
{% endblock %} {% block product_basket_form_children %} {{ block.super }} {% endblock product_basket_form_children %}
{% endblock product_main %}
{% ocyanjson "oscar" "enable_long_description" False as enable_long_description %}
{% block info_tab_wrapper %}
{% block tab_content %} {% block tab_description %} {% if enable_long_description and product.long_description %}
{{ product.long_description|richtext }}
{% endif %} {% endblock tab_description %} {% with long_description=product.long_description %} {% block tab_info %}
{% block product_default_info %} {{block.super}} {% endblock %} {% block product_price_info %} {{block.super}} {% endblock %} {% block product_availability_info %} {% endblock %} {% block product_attributes_info %} {{block.super}} {% endblock %} {% block product_reviews_info %} {{block.super}} {% endblock %}
{% trans "Categories" %} {% for category in product.get_categories.all %} {{ category.name }}{% if not forloop.last %},{% endif %} {% endfor %}
{% trans "Availability" %} {% if session.availability.is_available_to_buy %} {% trans 'Available' %} {% else %} {% trans 'Unavailable' %} {% endif %}
{% for cat in product_categories %} {% if cat.show_on_product %}
{{ cat.category.description|richtext }}
{% endif %} {% endfor %}
{% endblock tab_info %} {% endwith %} {% block tab_attribute_groups %} {% for attribute_group in attributes.grouped %} {% endfor %} {% endblock tab_attribute_groups %} {% block tab_reviews %} {% iffeature "reviews" %}
{% block product_review %} {% if not product.num_approved_reviews == 0 %}
{% if product.num_approved_reviews > 0 %}

{% trans "Customers give this product a" %} {{ product.rating }}

{% endif %}
{% if product.num_approved_reviews > 3 %} {% trans "See all reviews" %} {% endif %}

{% if product|is_review_permitted:user %} {% url 'catalogue:reviews-add' product_slug=product.slug product_pk=product.id as add_review_url %} {% trans "Write a review" %} {% else %} {% trans "This product does not have any reviews yet" %}. {% endif %}

{% endif %} {% if product.num_approved_reviews == 0 %}

{% if product|is_review_permitted:user %} {% url 'catalogue:reviews-add' product_slug=product.slug product_pk=product.id as add_review_url %} {% blocktrans %}This product does not have any reviews yet - be the first to write one. {% endblocktrans %} {% else %} {% trans "This product does not have any reviews yet" %}. {% endif %}

{% else %}
    {% for review in product.reviews.approved.all|slice:":3" %}
  1. {% include 'catalogue/partials/review.html' %}
  2. {% endfor %}
{% endif %} {% endblock %}
{% endiffeature %} {% endblock tab_reviews %} {% endblock tab_content %} {% endblock info_tab_wrapper %}
{% block recommended %} {% with recommended_products=product.sorted_recommended_products|slice:":6" %} {% if recommended_products %}
{% trans "Recommended items" %}
{% endif %} {% endwith %} {% endblock recommended %}
{% endblock content %} {% block outside_content %} {% endblock %}