{% extends "dashboard/base.html" %} {% load prices_i18n %} {% load i18n %} {% load materializecss %} {% load static %} {% load attributes %} {% block title %}{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %} - {% trans "Products" %} - {{ block.super }}{% endblock %} {% block body_class %}body-products{% endblock %} {% block header_menu %} {% url "dashboard:product-list" as url %} {% include "dashboard/includes/_back-link.html" with url=url %} {% endblock %} {% block header_extra %} {% if product.pk %} {% endif %} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block menu_catalogue_class %} active{% endblock %} {% block content %} {% if product.pk %}
{% endif %}
{% csrf_token %} {{ product_form.name|materializecss:"s12 m8" }} {{ product_form.price|materializecss:"s12 m4" }}
{{ product_form.description|materializecss }}
{{ product_form.weight|materializecss:"input-field s12" }} {{ product_form.categories|materializecss:"input-field s12" }} {{ product_form.attributes|materializecss:"input-field s12" }} {{ product_form.available_on|materializecss:"input-field s12" }}
{% if product.pk %} {% else %} {% endif %}
{% if product.pk %}
{% csrf_token %}
{% trans "Add" %}
{% if variants %} {% for attribute in attributes %} {% endfor %} {% for variant in variants %} {% for attr_display in variant|attributes_values_with_empty:attributes %} {% endfor %} {% endfor %} {% else %} {% endif %}
{% trans "SKU" %}{{ attribute.display|capfirst }}{% trans "Variant name" %} {% trans "Price" %}
{{ variant.sku }} {{ attr_display }} {{ variant.name }} {% gross variant.get_price_per_item %}
{% trans "There are no variants for this product" %}
{% csrf_token %}
{% trans "Add" %}
{% if stock_items %} {% for item in stock_items %} {% endfor %} {% else %} {% endif %}
{% trans "SKU" %} {% trans "Location" %} {% trans "Quantity" %} {% trans "Allocated" %}
{{ item.variant.sku }} {{ item.location }} {{ item.quantity }} {{ item.quantity_allocated }}
{% trans "There is no stock for this product." %}
{% if images %}
{% csrf_token %}
{% else %}

{% trans "This product has no images yet." %}

{% endif %}
{% endif %} {% endblock %}