{% extends "dashboard/base.html" %} {% load crispy_forms_tags static %} {% block title %}{% if object %}Modifier le transporteur{% else %}Nouveau transporteur{% endif %} — Comptoir{% endblock %} {% block content %}
Livraison

{% if object %}Modifier « {{ object.name }} »{% else %}Nouveau transporteur{% endif %}

{% if object %}
{% if object.is_active %}Proposé aux acheteurs{% else %}Pas encore proposé{% endif %}
{% csrf_token %}
{% endif %}
{% if object and activation_error %}

{{ activation_error }}

{% endif %}
{% csrf_token %} {{ form.name|as_crispy_field }} {{ form.has_free_shipping_threshold|as_crispy_field }}
{{ form.free_shipping_threshold|as_crispy_field }}
{% if object %}
{% for zone in zone_list %}
{{ zone.get_label }}

{% for country in zone.countries.all %}{{ country.printable_name }}{% if not forloop.last %}, {% endif %}{% empty %}Aucun pays{% endfor %}

{% if zone.pricing_mode == "flat" %}{% if zone.flat_price is None %}Prix non renseigné{% else %}Un seul prix : {{ zone.flat_price }} €{% endif %}{% else %}{{ zone.rate_list.all|length }} tranche{{ zone.rate_list.all|length|pluralize }} de poids{% endif %}{% if zone.get_transit_label %} — {{ zone.get_transit_label }}{% endif %}{% if zone.get_weight_range_label != "tous poids" %} — colis {{ zone.get_weight_range_label }}{% endif %}

{% empty %}

Aucune zone. Ajoutez au moins une zone (les pays desservis et leur prix) avant de proposer ce transporteur.

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