{% extends 'oscar/dashboard/layout.html' %} {% load form_tags %} {% load i18n %} {% block body_class %}{{ block.super }} create-page catalogue{% endblock %} {% block title %} {{ title }} | {% trans "Products" %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %}
{% csrf_token %} {% if parent %}
{% url 'dashboard:catalogue-product' pk=parent.id as parent_url %} {% blocktrans with title=parent.title %} You are currently editing a product variant of {{ title }}. {% endblocktrans %}
{% endif %}
{% block tab_nav %}

{% trans "Sections" %}

{% endblock tab_nav %}
{% block tab_content %} {% block product_details %}

{% trans "Product details" %}

{% block product_details_content %} {{ form.non_field_errors }} {% for field in form.hidden_fields %} {{ field }} {% endfor %} {% for field in form.primary_form_fields %} {% if 'attr' not in field.id_for_label %} {% include 'oscar/dashboard/partials/form_field.html' with field=field %} {% endif %} {% endfor %} {% endblock product_details_content %}
{% endblock product_details %} {% block product_categories %}
{% block product_categories_content %} {{ category_formset.management_form }} {{ category_formset.non_form_errors }} {% for category_form in category_formset %} {% endfor %}
{% trans "Category" %}
{% include "oscar/dashboard/partials/form_fields_inline.html" with form=category_form %}
{% endblock product_categories_content %}
{% endblock product_categories %} {% block product_attributes %}
{% block product_attributes_content %} {% for field in form %} {% if 'attr' in field.id_for_label %} {% endif %} {% endfor %}
{% trans "Attributes" %} {% trans "Product Type:" %} {{ product_class }}
{% include "oscar/dashboard/partials/form_field.html" %}
{% endblock product_attributes_content %}
{% endblock product_attributes %} {% block product_images %}
{% block product_images_content %}

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

{{ image_formset.management_form }} {{ image_formset.non_form_errors }}
    {% for image_form in image_formset %} {% include "oscar/dashboard/partials/product_images.html" with form=image_form %} {% endfor %}

{% trans 'Drag images to re-order them. Space for additional images will appear when images are added.' %}

{% endblock product_images_content %}
{% endblock product_images %} {% block stockrecords %}
{% block stockrecords_content %} {{ stockrecord_formset.management_form }} {{ stockrecord_formset.non_form_errors }} {% if product_class.track_stock %} {% endif %} {% for stockrecord_form in stockrecord_formset %} {% if stockrecord_form.non_field_errors %} {% endif %} {% if product_class.track_stock %} {% endif %} {% endfor %}
{% trans "Stock and pricing" %}
{% trans "Partner" %} {% trans "SKU" %}{% trans "Num in stock" %} {% trans "Num allocated" %} {% trans "Low stock threshold" %}{% trans "Currency" %} {% trans "Price" %} {% trans "Delete?" %}
{% for error in stockrecord_form.non_field_errors %} {{ error }} {% endfor %}
{% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.partner nolabel=True %} {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.partner_sku nolabel=True %}{% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.num_in_stock nolabel=True %} {{ stockrecord_form.instance.num_allocated|default:"-" }} {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.low_stock_threshold nolabel=True %}{% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.price_currency nolabel=True %} {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.price nolabel=True %} {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.id nolabel=True %} {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.DELETE nolabel=True %}
{% endblock stockrecords_content %}
{% endblock stockrecords %} {% block child_products %} {% with children=product.children.all %}
{% block child_products_content %} {% if children %} {% for child in children %} {% endfor %} {% else %} {% endif %}
{% trans "Variants" %}
{% trans "Title" %} {% trans "Attributes" %} {% trans "Stock records" %} {% trans "Is public?" %}  
{{ child.get_title }} {{ child.attribute_summary }} {{ child.stockrecords.count }} {% if child.is_public %}{% else %}{% endif %} {% trans "Edit" %} {% trans "Delete" %}
{% if product.can_be_parent %} {% trans 'This product does not have any variants.' %} {% else %} {% trans "One can't add variants to this product at this point." %} {% if product.pk is None %} {% trans "Please save the product before trying to add variants." %} {% elif product.has_stockrecords %} {% trans 'This is likely because this product still has stock records.' %} {% endif %} {% endif %}
{% endblock child_products_content %}
{% endwith %} {% endblock child_products %} {% block recommended_products %} {% endblock recommended_products %} {% block seo %}

{% trans "Search engine optimisation" %}

{% block seo_content %} {% for field in form.seo_form_fields %} {% if 'attr' not in field.id_for_label %} {% include 'oscar/dashboard/partials/form_field.html' with field=field %} {% endif %} {% endfor %} {% endblock seo_content %}
{% endblock seo %} {% endblock tab_content %}
{% block fixed_actions_group %}
{% trans "Cancel" %} {% trans "or" %} {% if parent %} {% endif %}
{% if product %} {% trans "View on site" %} {% endif %}
{% endblock fixed_actions_group %}
{% endblock dashboard_content %}