{% extends 'dashboard/layout.html' %} {% load i18n %} {% load currency_filters %} {% load thumbnail %} {% block body_class %}create-page catalogue{% endblock %} {% block title %} {{ title }} | {% trans "Product management" %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %}
{% csrf_token %}

{% trans "Sections" %}

{% if product %}

{% trans "Overview" %}

{{ product.get_title }}


{% if product.primary_image.original.url %} {% with image=product.primary_image %} {% thumbnail image.original "250x250" upscale=False as thumb %} {{ product.get_title }} {% endthumbnail %} {% endwith %} {% endif %}

{% trans "Fulfilment partner" %}
{% if product.has_stockrecord %} {{ product.stockrecord.partner.name }} {% else %} {% trans "Out of stock" %} {% endif %}

{% trans "Description" %}
{{ product.description|safe }}

{% with stats=product.stats %}
{% trans "Views" %} {{ stats.num_views|default:0 }}
{% trans "Baskets" %} {{ stats.num_basket_additions|default:0 }}
{% trans "Purchases" %} {{ stats.num_purchases|default:0 }}
{% endwith %}

{% trans "Categories" %}

{% if product.categories %} {% for category in product.categories.all %} {% endfor %} {% else %} {% endif %}
{{ category.full_name }}
{% trans "No categories setup for this product" %}

{% trans "Ranges" %}

{% if ranges.count > 0 %} {% for range in ranges %} {% endfor %} {% else %} {% endif %}
{{ range.name }}
{% trans "No ranges currently include this product for this product" %}

{% trans "Offers" %}

{% if offers.count > 0 %} {% for offer in offers %} {% endfor %} {% else %} {% endif %}
{{ offer.name }}
{% trans "No offers currently include this product" %}
{% endif %}

{% trans "Product Details" %}

{{ form.non_field_errors }} {% for field in form %} {% if field.is_hidden %} {{ field }} {% endif %} {% if 'attr' not in field.id_for_label %}
{% if field.is_hidden %} {{ field }} {% else %}
{{ field }} {% for error in field.errors %} {{ error }} {% endfor %} {% if field.help_text %} {{ field.help_text }} {% endif %}
{% endif %}
{% endif %} {% endfor %} {% with parent=product.parent %} {% if parent %}
{% endif %} {% endwith %}
{% with variants=product.variants.all %} {% if variants|length > 0 %}
{% with parent=product.parent %} {% if parent %} {% endif %} {% endwith %} {% for variant in variants %} {% endfor %}
{% trans "Variants" %}
{% trans "Parent" %}
{{ parent.title }} {% trans "Edit" %}
{% trans "Children" %}
{{ variant.title }} {% trans "Edit" %}
{% endif %} {% endwith %}
{% for field in form %} {% if 'attr' in field.id_for_label %} {% endif %} {% endfor %}
{% trans "Product Attributes" %} {% trans "Product class:" %} {{ product.product_class }}
{% trans "Attribute name" %} {% trans "Attribute option" %}
{{ field.label }}{% if field.field.required %} *{% endif %} {% if field.is_hidden %} {{ field }} {% else %} {{ field }} {% for error in field.errors %} {{ error }} {% endfor %} {% if field.help_text %} {{ field.help_text }} {% endif %} {% endif %}
{{ category_formset.management_form }} {{ category_formset.non_form_errors }} {% for category_form in category_formset %} {% endfor %}
{% trans "Category" %}
{% include "partials/form_fields_inline.html" with form=category_form %}

{% trans "Upload, change or remove images" %}

{{ image_formset.management_form }} {{ image_formset.non_form_errors }}
    {% for image_form in image_formset %} {% include "dashboard/partials/product_images.html" with form=image_form %} {% endfor %}
{{ stockrecord_form.non_field_errors }} {% for field in stockrecord_form %} {% if "partner" in field.id_for_label %} {% endif %} {% if "price" in field.id_for_label %} {% endif %} {% if "stock" in field.id_for_label %} {% endif %} {% endfor %} {% for field in stockrecord_form %} {% if "partner" in field.id_for_label %} {% endif %} {% if "price" in field.id_for_label %} {% endif %} {% if "stock" in field.id_for_label %} {% endif %} {% endfor %}
{% trans "Stock and price information" %}
{{ field.label }}{% if field.field.required %} *{% endif %}{{ field.label }}{% if field.field.required %} *{% endif %}{{ field.label }}{% if field.field.required %} *{% endif %}
{{ field }} {{ field.errors }} {{ field }} {{ field.errors }} {{ field }} {{ field.errors }}
{% trans "Cancel" %} {% trans "or" %}
{% if product %} {% trans "View on site" %} {% endif %}
{% endblock dashboard_content %}