templates/entreprise/top_menu_cart.html.twig line 1

Open in your IDE?
  1. <div class="navbar-tool dropdown ml-3"><a class="navbar-tool-icon-box bg-secondary dropdown-toggle" href="{{ path('cart') }}"><span id="checkout_items" class="navbar-tool-label">{{ nombreProduit }}</span><i class="navbar-tool-icon czi-cart"></i></a><a class="navbar-tool-text" href="{{ path('cart') }}"><small>Mon panier</small><span class="formated-number" id="montantProduit">{{ montantProduit }}</span> {{ devise }}</span></a>
  2.                 <!-- Cart dropdown-->
  3.                 <div class="dropdown-menu dropdown-menu-right" style="width: 20rem;">
  4.                   <div class="widget widget-cart px-3 pt-2 pb-3">
  5.                     <div style="height: 15rem;" data-simplebar data-simplebar-auto-hide="false">
  6.                     
  7.                     {% set sousTotal = 0 %}
  8.                     {% for product in panier %}
  9.                      <div class="widget-cart-item pb-2 border-bottom">
  10.                         <button title="{{ path('delete_cart_item', {'product': product.id}) }}" class="close removeProductFromCart text-danger" type="button" aria-label="Remove"><span aria-hidden="true">&times;</span></button>
  11.                         <div class="media align-items-center"><a class="d-block mr-2" href="{{ path('display_product', {'leSlug': product.slug}) }}"><img width="64" src="{{ product.imagePrincipale }}" alt="Product"/></a>
  12.                           <div class="media-body">
  13.                             <h6 class="widget-product-title"><a href="{{ path('display_product', {'leSlug': product.slug}) }}">{{ product.nom }}</a></h6>
  14.                             <div class="widget-product-meta"><span class="text-accent formated-number mr-2">{{ product.price }}</span>{{ devise }}<span class="text-muted">X {{ product.quantity }}</span></div>
  15.                           </div>
  16.                         </div>
  17.                       </div>
  18.                       {% set sousTotal = sousTotal + product.price %}
  19.                       {% endfor %}
  20.                     </div>
  21.                     <div class="d-flex flex-wrap justify-content-between align-items-center py-3">
  22.                       <div class="font-size-sm mr-2 py-2"><span class="text-muted">Soustotal:</span><span class="text-accent formated-number font-size-base ml-1">{{ sousTotal }}</span>{{ devise }}</div><a class="btn btn-outline-secondary btn-sm" href="{{ path('cart') }}">Voir panier<i class="czi-arrow-right ml-1 mr-n1"></i></a>
  23.                     </div><a class="btn btn-primary btn-sm btn-block" href="{{ path('indiquer_adresse') }}"><i class="czi-card mr-2 font-size-base align-middle"></i>Finaliser commande</a>
  24.                   </div>
  25.                 </div>
  26. </div>