{% if region is defined %} {% else %} {% set region = '' %} {% endif %} {% extends "::layout"~region~".html.twig" %} {% block container %}
{% set livraison = 1 %} {% set seuil = 1 %} {% if contenu|length > 0 %}
{% for boutique in boutiques %}
{% if boutique.produits|length > 0 %}

Produits livrés à domicile :

    {% for item in boutique.produits %}
  • {# {% for stock in item.product.material.stocks %} {% if stock.taille == item.size %} {% set totalPrice = stock.currentprice*item.count %}

    {{ totalPrice|toeuro }}

    {% endif %} {% endfor %} #}

    {{ item.basePrice|toeuro }}

    {{ item.product.titre }} {% if item.composition %} - {{item.composition.title}} {% endif %}

    ref. {{ item.product.ref }} - {{ item.size }} {% if item.product.declinaisonOption %}- {{ item.product.declinaisonOption }}{% endif %}

      {# orientation #} {% if item.composition and (item.composition.orientation1 > 0 or item.composition.orientation2 > 0 ) %}
    • Composition : {% if item.composition.orientation1 > 0 %} {% if item.composition.orientation1 == 2 %} Droite {% else %} Gauche {% endif %} {% endif %} {% if item.composition.orientation1 > 0 and item.composition.orientation2 > 0 %} | {% endif %} {% if item.composition.orientation2 > 0 %} {% if item.composition.orientation2 == 2 %} Bas {% else %} Haut {% endif %} {% endif %}
    • {% endif %} {# options #} {% set optionIdList = [] %} {% for panierContent in contenu[boutique.boutique.id] %} {% for panierContentOption in panierContent.panierContentOptions if panierContent.id == item.id %} {% set optionIdList = optionIdList|merge([panierContentOption.productSousOption.id]) %}
    • {{panierContentOption.optionTitle}} : "{{ panierContentOption.name }}" {{ panierContentOption.price }}€
    • {% endfor %} {% endfor %} {# options avancées #} {% set advancedOptionIdList = [] %} {% set aoConteneur = [] %} {% set advancedId = [] %} {% for panierContent in contenu[boutique.boutique.id] %} {% for panierContentOption in panierContent.panierContentAdvancedOptions if panierContent.id == item.id %} {% set advancedOptionIdList = advancedOptionIdList|merge([panierContentOption.productSousOption.id]) %} {% set ref = ''~panierContentOption.advancedProductSousOption.id~'' %} {% set aoConteneur = aoConteneur|merge([ref]) %} {# selon prix groupé #} {% if panierContentOption.advancedPrice > 0 %} {% if panierContentOption.advancedId in advancedId %} {% set currentPrice = '/ ' %} {% else %} {% set advancedId = advancedId|merge([panierContentOption.advancedId]) %} {% set currentPrice = panierContentOption.advancedPrice %} {% endif %} {% else %} {% set currentPrice = panierContentOption.price %} {% endif %}
    • {{panierContentOption.advancedSubtitle}} : "{{ panierContentOption.name }}" {{currentPrice}}€
    • {% endfor %} {% endfor %}
    {% set aoFinal = {} %} {% if aoConteneur[0] is defined %} {% set oldRef = ''~aoConteneur[0]~'' %} {% set curList = [] %} {% for ref in aoConteneur %} {% if ref == oldRef %} {% set curList = curList|merge([advancedOptionIdList[loop.index0]]) %} {% else %} {% set aoFinal = aoFinal|merge({("x"~oldRef):curList}) %} {% set curList = [] %} {% set oldRef = ''~ref~'' %} {% set curList = curList|merge([advancedOptionIdList[loop.index0]]) %} {% endif %} {% endfor %} {% set aoFinal = aoFinal|merge({("x"~oldRef):curList}) %} {% endif %} {# composition #} {% if item.composition %} {% set composition = [item.composition.composition.id, item.composition.orientation1, item.composition.orientation2] %} {% else %} {% set composition = [] %} {% endif %}
    {% if item.livreurChoix %}
    {{ item.livreurChoix.livreur.name }} {{ item.livraisonPrice|toeuro }} TTC modifier
    {% else %} {% endif %}
  • {% endfor %}

Total frais de port : {{ boutique.frais|toeuro }} TTC

{% endif %} {% if boutique.retraits|length > 0 %}

Produits à retirer chez le vendeur :

    {% for item in boutique.retraits %}
  • {# {% for stock in item.product.material.stocks %} {% if stock.taille == item.size %} {% set totalPrice = stock.currentprice*item.count %}

    {{ totalPrice|toeuro }}

    {% endif %} {% endfor %} #}

    {{ item.basePrice|toeuro }}

    {{ item.product.titre }}

    ref. {{ item.product.ref }} - {{ item.size }} {% if item.product.declinaisonOption %}- {{ item.product.declinaisonOption }}{% endif %}

    {% if item.product.decline %} {% set product = item.product.declinaison %} {% else %} {% set product = item.product %} {% endif %} {% if product.material and product.material.commandeType.retraitType == 3 %}

    Le retrait sera possible {{ product.material.commandeType.retraitTypeOption~":"~product.material.commandeType.retraitTypeOption2 }} après la commande.

    {% else %} {% if product.material %} {% set retraitdelais = product.material.commandeType.retraitDelais %} {% if product.material.commandeType.retraitDelais == 2 %} {% set retraitdelais = product.material.commandeType.retraitCustomDelais %} {% endif %} {% endif %}

    Le retrait sera possible à partir du {{ retraitdelais|addtodate }} {% if product.material and product.material.commandeType.retraitType == 1 %} {% if product.material.commandeType.retraitTypeOption == 1 %} sur RENDEZ-VOUS. La prise de RDV se fera sur le site. {% endif %} {% if product.material.commandeType.retraitTypeOption == 2 %} sur RENDEZ-VOUS. La prise de RDV se fera par téléphone. {% endif %} {% if product.material.commandeType.retraitTypeOption == 3 %} sur RENDEZ-VOUS. La prise de RDV se fera par téléphone. {% endif %} {% endif %} {% if product.material and product.material.commandeType.retraitType == 2 %} à tout moment aux horaires d'ouverture. {% endif %} {% if product.material and product.material.commandeType.retraitType == 4 %} aux horaires spécifiées. {% endif %} {% endif %}

  • {% endfor %}
{% endif %} {% if boutique.services|length > 0 %}

Services réservés :

    {% for item in boutique.services %}
  • {% if item.product.service.paiement == 1 %}

    {{ 5|toeuro }}

    {% if item.product.service.multy == true %} {% for tarif in item.product.service.tariflist %} {% if tarif.id == item.size %}

    {{ item.product.titre }} - {{ tarif.name }}

    {% endif %} {% endfor %} {% else %}

    {{ item.product.titre }}

    {% endif %} {% else %} {% if item.product.service.multy == true %} {% for tarif in item.product.service.tariflist %} {% if tarif.id == item.size %}

    {{ tarif.currenttarif|toeuro }}

    {{ item.product.titre }} - {{ tarif.name }}

    {% endif %} {% endfor %} {% else %}

    {{ item.product.service.currentTarif|toeuro }}

    {{ item.product.titre }}

    {% endif %} {% endif %}

    ref. {{ item.product.ref }}

    {% if item.product.service.paiement == 1 %} {% if item.product.service.multy == true %} {% set prixTotalWithAcompte = 1 %} {% for tarif in item.product.service.tariflist %} {% if tarif.id == item.size %} {% set prixTotalWithAcompte = tarif.currenttarif %} {% endif %} {% endfor %} {% else %} {% set prixTotalWithAcompte = 1 %} {% set prixTotalWithAcompte = item.product.service.currentTarif %} {% endif %}

    Prix total : {{ prixTotalWithAcompte|toeuro }}. Un acompte de 5€ est à régler de suite. Le vendeur vous facturera le montant restant le jour du RDV.

    {% endif %}

    {% if item.product.service.ou == 1 %} à réaliser à domicile. {% else %} Dans nos locaux. {% endif %}
    RDV à fixer avec le vendeur après la commande

  • {% endfor %}
{% endif %}

Total vendeur : {{ boutique.tarif|toeuro }} TTC

{% if panier.codePromo and (boutique.reduction.freeShipping or boutique.reduction.value > 0) %}

Vous bénéficez actuellement de : {% if boutique.reduction.value > 0 %}{{boutique.reduction.value|toeuro}} de réduction. {% endif %}{% if boutique.reduction.freeShipping %}Du port offert : {{boutique.reduction.valueShipping|toeuro}}.{% endif %}

{% endif %}
{% endfor %}
{% if codePromoForm.codePromo.vars.errors|length %}
{{ form_errors(codePromoForm) }} {{ form_errors(codePromoForm.codePromo) }}
{% endif %} {{ form_widget(codePromoForm.codePromo, {'attr':{'placeholder':'Code promo', 'style':'text-align:center;margin-left:20px;'}}) }} {{ form_rest(codePromoForm) }}
{% if seuil == 0 %} Passer commande {% elseif livraison == 0 %} Passer commande {% else %} Passer commande {% endif %}

Total : {{ total|toeuro }} TTC

{% else %}

Votre panier est actuellement vide

{% endif %}
{% endblock %} {% block append_javascript %} {{ parent() }} {% endblock %}