{% load static %} {% comment %}Story 1.14 — the « Déclinaisons » card, saved with « Enregistrer » (parsed by product_variants.parse_variant_form_data); works without JS.{% endcomment %} {% if variant_card %}
Déclinaisons

Taille, couleur… Chaque combinaison a son stock, sa référence et, au besoin, son prix et sa photo.

{% for error in variant_card.error_list %}

{{ error }}

{% endfor %} {% comment %}Tells the server the card was sent: a parent posted without it is not « back to a simple product ».{% endcomment %}
    {% for option in variant_card.option_slot_list %}
  1. {% if option.error %}

    {{ option.error }}

    {% endif %}
  2. {% endfor %}
Recalcule les combinaisons sans rien enregistrer.
{% if variant_card.carry %}

Ce produit a {{ variant_card.carry.stock_count }} exemplaire(s) en stock. Reporter ce stock sur :

{% endif %}
{% for row in variant_card.row_list %} {% include "dashboard/ecommerce/_product_variant_row.html" with row=row %} {% endfor %}
PhotoDéclinaisonPrixStockRéférence

Stock total : {{ variant_card.total_stock }}

{% if variant_card.inactive_list %}

Déclinaisons désactivées

    {% for item in variant_card.inactive_list %}
  • {{ item.label }} — Désactivée — déjà commandée
  • {% endfor %}
{% endif %} {% comment %}A photo is chosen among the product's saved ones only (Story 1.11); the dialog's controls are type=button, so it never submits the product form.{% endcomment %}

Choisir la photo de cette déclinaison

{% for image in variant_card.photo_list %} {% endfor %}
{% if not variant_card.photo_list %}

Aucune photo enregistrée : ajoutez-en au produit puis enregistrez.

{% else %}

Enregistrez d'abord pour pouvoir choisir une photo ajoutée à l'instant.

{% endif %}
{% comment %}Sortable (chips order) is loaded by the photos card, later in the page.{% endcomment %}
{% endif %}