templates/front-office/partials/sewing/_basket_item.html.twig line 1

Open in your IDE?
  1. {% if sewings is not defined %}
        {% set sewings = "" %}
    {% endif %}
    {% if formations is not defined %}
        {% set formations = "" %}
    {% endif %}
    {% set basketTotal = 0 %}
    <div class="partial-sewing-basket-item-box">
        {% for sewing in sewings %}
            {% set s = sewing["entity"] %}
            {% set quantity = sewing["quantity"] %}
            {% set currentPrice = s.priceHt*quantity*(1+s.tva) %}
            {% set basketTotal = basketTotal + currentPrice %}
            <div class="partial-sewing-basket-item">
    
                <div class="meli-between-start h100">
                    <div class="img-box meli-width-50 h100">
                        {% set textSize = "text-size20" %}
                        {% include "front-office/partials/sewing/_item_picture.html.twig" %}
                    </div>
    
                    <div class="text-box meli-width-45">
                        <p class="txt-dancing txt-bold txt-size20 txt-white">{{ s.name }}</p>
                        {% if quantity > 1 %}
                            <p class="txt-centure txt-bold txt-size20 txt-white"><span>x {{ quantity }}</p>
                        {% endif %}
                        <p class="txt-centure txt-bold txt-size20 txt-white"><span>{{ currentPrice|number_format(2,","," ") }}</span> € TTC</p>
                    </div>
                </div>
    
            </div>
        {% endfor %}
    
        {% for f in formations %}
            {% set currentPrice = f.priceHt*(1+f.tva) %}
            {% set basketTotal = basketTotal + currentPrice %}
            <div class="partial-sewing-basket-item">
    
                <div class="meli-between-start h100">
                    <div class="img-box meli-width-50 h100">
                        {% set textSize = "text-size20" %}
                        {% include "front-office/partials/formation/_item_picture.html.twig" %}
                    </div>
    
                    <div class="text-box meli-width-45">
                        <p class="txt-dancing txt-bold txt-size20 txt-white">{{ f.name }}</p>
                        <p class="txt-centure txt-bold txt-size20 txt-white"><span>{{ currentPrice|number_format(2,","," ") }}</span> € TTC</p>
                    </div>
                </div>
    
            </div>
        {% endfor %}
    </div>
    
    
    <div class="total">
        <p class="txt-century txt-white txt-size25 txt-bold">SOUS-TOTAL</p>
        <p class="txt-century txt-white txt-size25 txt-bold">
                    <span id="js-sewing-read-basket-total">
                        {{ basketTotal|number_format(2,","," ") }}
                    </span> € TTC
        </p>
    </div>