templates/cart_preview.html.twig line 1

Open in your IDE?
  1. <span class="uk-text-bold"><span uk-icon="cart"></span> Koszyk</span><br/>
  2. {% if app.session.get ("koszyk") is null %}
  3.     Koszyk jest pusty
  4. {% else %}
  5.     {% if app.session.get ("koszyk").count > 0 %}
  6.         <table class="uk-table uk-table-striped uk-table-small uk-padding-remove uk-width-expand">
  7.             <thead>
  8.                 <tr>
  9.                     <th style="padding: 2px; font-size: 0.8em;" width="10%">lp</th>
  10.                     <th style="padding: 2px; font-size: 0.8em;" width="40%">domena</th>
  11.                     <th style="padding: 2px; font-size: 0.8em;" width="40%">cena netto</th>
  12.                     <th style="padding: 2px; font-size: 0.8em;" width="5%">&nbsp;</th>
  13.                 </tr>
  14.             </thead>
  15.             <tbody>
  16.                 {% set LP = 1 %}
  17.                 {% for POZYCJA in app.session.get ("koszyk").positions %}
  18.                     <tr data-domain='{{ POZYCJA.domain }}'>
  19.                         <td style="padding: 2px; font-size: 0.8em;" width="10%">{{ LP }}</td>
  20.                         <td style="padding: 2px; font-size: 0.8em;" width="40%">{{ POZYCJA.domain }}</td>
  21.                         <td style="padding: 2px; font-size: 0.8em;" width="40%">{{ POZYCJA.price_str }}</td>
  22.                         <td style="padding: 2px; font-size: 0.8em; cursor: pointer;" width="5%" align='center' onclick='removeFromCart ("{{ POZYCJA.domain }}");'>X</td>
  23.                     </tr>
  24.                     {% set LP = LP + 1 %}
  25.                 {% endfor %}
  26.             </tbody>
  27.             <tfooter>
  28.                 <tr>
  29.                     <td></td>
  30.                     <td colspan='2' class='uk-text-right uk-text-bold'>{{ app.session.get ("koszyk").totalStr }}</td>
  31.                     <td></td>
  32.                 </tr>
  33.             </tfooter>
  34.         </table>
  35.         <button class='uk-button uk-button-primary uk-button-small' onclick='document.location.href="{{ path("cart-view") }}";'><span uk-icon='cart'></span> Przejdź do koszyka</button>
  36.     {% else %}
  37.         Koszyk jest pusty
  38.     {% endif %}
  39. {% endif %}