{% extends 'dashboard/layout.html' %} {% load i18n %} {% load thumbnail %} {% load staticfiles %} {% load form_tags %} {% 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.visible_fields %} {% if 'attr' not in field.id_for_label %} {% include '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 "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 "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 "dashboard/partials/product_images.html" with form=image_form %} {% endfor %}
{% 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 "Cost price" %} {% trans "Price (excl tax)" %} {% trans "Retail price" %} {% trans "Delete?" %}
{% for error in stockrecord_form.non_field_errors %} {{ error }} {% endfor %}
{% include "dashboard/partials/form_field.html" with field=stockrecord_form.partner nolabel=True %} {% include "dashboard/partials/form_field.html" with field=stockrecord_form.partner_sku nolabel=True %}{% include "dashboard/partials/form_field.html" with field=stockrecord_form.num_in_stock nolabel=True %} {{ stockrecord_form.instance.num_allocated|default:"-" }} {% include "dashboard/partials/form_field.html" with field=stockrecord_form.low_stock_threshold nolabel=True %}{% include "dashboard/partials/form_field.html" with field=stockrecord_form.price_currency nolabel=True %} {% include "dashboard/partials/form_field.html" with field=stockrecord_form.cost_price nolabel=True %} {% include "dashboard/partials/form_field.html" with field=stockrecord_form.price_excl_tax nolabel=True %} {% include "dashboard/partials/form_field.html" with field=stockrecord_form.price_retail nolabel=True %} {% include "dashboard/partials/form_field.html" with field=stockrecord_form.id nolabel=True %} {% include "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" %}  
{{ child.get_title }} {{ child.attribute_summary }} {{ child.stockrecords.count }} {% 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.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 %} {% 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 %}