templates/includes/cart/_load.html.twig line 1

Open in your IDE?
  1. {# <a href="#" class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
  2.     data-display="static">
  3.     <i class="icon-shopping-cart"></i>
  4.     <span class="cart-count">
  5.         {{ app.request.session.get('panier') |length }}
  6.     </span>
  7.     <span class="cart-txt">{{ site.current_name ~ cartTotal()|number_format(2,'.', ' ') }}</span>
  8. </a>
  9. <div class="dropdown-menu dropdown-menu-right">
  10.     <div class="dropdown-cart-products">
  11.         {% for cart in cartAll() %}
  12.         <div class="product">
  13.             <div class="product-cart-details">
  14.                 <h4 class="product-title">
  15.                     <a href="{{ path('articles') }}">{{cart.article.title}}</a>
  16.                 </h4>
  17.                 <span class="cart-product-info">
  18.                     <span class="cart-product-qty">{{ cart.quantite }}</span>
  19.                     x
  20.                     {{ site.current_name ~ cart.article.newPrice|number_format(2,'.',' ') }}
  21.                 </span>
  22.             </div>
  23.             <!-- End .product-cart-details -->
  24.             <figure class="product-image-container">
  25.                 <a href="{{ path('articles') }}" class="product-image">
  26.                     {% for img in cart.article.images|slice(0,1) %}
  27.                     <img src="{{ asset('img/article/' ~ img.name) }}" alt="product">
  28.                     {% else %}
  29.                     <img src="{{ asset('img/vide.png') }}" alt="{{ cart.article.title }}">
  30.                     {% endfor %}
  31.                 </a>
  32.             </figure>
  33.             <a href="{{ path('cart_delete',{id:cart.article.id}) }}" data-id="{{ cart.article.id }}"
  34.                 class="btn-remove js-delete-cart" title="Remove Product">
  35.                 <i class="icon-close"></i>
  36.             </a>
  37.         </div>
  38.         {% else %}
  39.         <div class="text-center">
  40.             <h5>{{'Empty cart'|trans }}</h5>
  41.             <h6>Ajouter au moins un article au panier</h6>
  42.         </div>
  43.         <!-- End .product -->
  44.         {% endfor %}
  45.     </div>
  46.     <!-- End .cart-product -->
  47.     <div class="dropdown-cart-total">
  48.         <span>Total</span>
  49.         <span class="cart-total-price">
  50.             {{ site.current_name}}</span>
  51.         {{ cartTotal()|number_format(2,'.', ' ') }}
  52.     </div>
  53.     <!-- End .dropdown-cart-total -->
  54.     <div class="dropdown-cart-action">
  55.         <a href="{{ path('cart_index') }}" class="btn btn-primary">{{'View Cart'|trans}}</a>
  56.     </div>
  57.     <!-- End .dropdown-cart-total -->
  58. </div> #}
  59. <div class="dropdown cart-dropdown">
  60.     <a href="{{path('cart_index')}}" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-display="static">
  61.         <div class="icon">
  62.             <i class="icon-shopping-cart"></i>
  63.             <span class="cart-count">{{ app.request.session.get('panier') |length }}</span>
  64.         </div>
  65.         <p>{{'Cart'|trans}}</p>
  66.     </a>
  67.     <div class="dropdown-menu dropdown-menu-right">
  68.         <div class="dropdown-cart-products">
  69.             {# <div class="product">
  70.                 <div class="product-cart-details">
  71.                     <h4 class="product-title">
  72.                         <a href="product.html">Beige knitted elastic runner shoes</a>
  73.                     </h4>
  74.                     <span class="cart-product-info">
  75.                         <span class="cart-product-qty">1</span>
  76.                         x $84.00
  77.                     </span>
  78.                 </div>
  79.                 <!-- End .product-cart-details -->
  80.                 <figure class="product-image-container">
  81.                     <a href="product.html" class="product-image">
  82.                         <img src="assets/images/products/cart/product-1.jpg" alt="product">
  83.                     </a>
  84.                 </figure>
  85.                 <a href="#" class="btn-remove" title="Remove Product">
  86.                     <i class="icon-close"></i>
  87.                 </a>
  88.             </div>
  89.             <!-- End .product -->
  90.             <div class="product">
  91.                 <div class="product-cart-details">
  92.                     <h4 class="product-title">
  93.                         <a href="product.html">Blue utility pinafore denim dress</a>
  94.                     </h4>
  95.                     <span class="cart-product-info">
  96.                         <span class="cart-product-qty">1</span>
  97.                         x $76.00
  98.                     </span>
  99.                 </div>
  100.                 <!-- End .product-cart-details -->
  101.                 <figure class="product-image-container">
  102.                     <a href="product.html" class="product-image">
  103.                         <img src="assets/images/products/cart/product-2.jpg" alt="product">
  104.                     </a>
  105.                 </figure>
  106.                 <a href="#" class="btn-remove" title="Remove Product">
  107.                     <i class="icon-close"></i>
  108.                 </a>
  109.             </div>
  110.             <!-- End .product -->
  111.         </div>
  112.         <!-- End .cart-product --> #}
  113.         {% for cart in cartAll() %}
  114.         <div class="product">
  115.             <div class="product-cart-details">
  116.                 <h4 class="product-title">
  117.                     <a href="{{ path('articles') }}">{{cart.article.title}}</a>
  118.                 </h4>
  119.                 <span class="cart-product-info">
  120.                     <span class="cart-product-qty">{{ cart.quantite }}</span>
  121.                     x
  122.                     {{ cart.article.newPrice|number_format(0,'.',' ') ~ " " ~ site.current_name }}
  123.                 </span>
  124.             </div>
  125.             <!-- End .product-cart-details -->
  126.             <figure class="product-image-container">
  127.                 <a href="{{ path('articles') }}" class="product-image">
  128.                     {% for img in cart.article.images|slice(0,1) %}
  129.                     <img src="{{ asset('img/article/' ~ img.name) }}" alt="product">
  130.                     {% else %}
  131.                     <img src="{{ asset('img/vide.png') }}" alt="{{ cart.article.title }}">
  132.                     {% endfor %}
  133.                 </a>
  134.             </figure>
  135.             <a href="{{ path('cart_delete',{id:cart.article.id}) }}" data-id="{{ cart.article.id }}"
  136.                 class="btn-remove js-delete-cart" title="Remove Product">
  137.                 <i class="icon-close"></i>
  138.             </a>
  139.         </div>
  140.         {% else %}
  141.         <div class="text-center">
  142.             <h5>{{'Empty cart'|trans }}</h5>
  143.             <h6>Ajouter au moins un article au panier</h6>
  144.         </div>
  145.         <!-- End .product -->
  146.         {% endfor %}
  147.             <div class="dropdown-cart-total">
  148.         <span>Total</span>
  149.         <span class="cart-total-price">
  150.         
  151.         {{ cartTotal()|number_format(0,'.', ' ') }}
  152.                 {{ site.current_name}}</span>
  153.     </div>
  154.     <!-- End .dropdown-cart-total -->
  155.     <div class="dropdown-cart-action">
  156.         <a href="{{ path('cart_index') }}" class="btn btn-primary">{{'View Cart'|trans}}</a>
  157.     </div>
  158.     </div>
  159.     <!-- End .dropdown-menu -->
  160. </div>