templates/VisualMediaOrderBundle/views/Cart/cart.html.twig line 1

Open in your IDE?
  1. <div class="cart">
  2.     {{ form_start(form, { attr: { class: 'form-horizontal validation' }}) }}
  3.     {{ form_errors(form) }}
  4.     <table class="table table-hover table-borderless">
  5.         <thead>
  6.             <tr>
  7.                 <th style="width: 150px;"></th>
  8.                 <th>{{ 'cart.product'|trans({}, 'frontend') }}</th>
  9.                 <th style="width: 15%;">{{ 'cart.amount'|trans({}, 'frontend') }}</th>
  10.                 <th class="text-right">{{ 'cart.price'|trans({}, 'frontend') }}</th>
  11.                 <th class="text-left">{{ 'cart.total'|trans({}, 'frontend') }}</th>
  12.                 <th></th>
  13.             </tr>
  14.         </thead>
  15.         <tbody>
  16.             {% for child in form.items %}
  17.                 {% include '@VisualMediaOrder/Cart/item.html.twig' with { form: child } only %}
  18.             {% else %}
  19.                 <tr>
  20.                     <td></td>
  21.                     <td colspan="5">{{ 'cart.empty'|trans({}, 'frontend') }}</td>
  22.                 </tr>
  23.             {% endfor %}
  24.         </tbody>
  25.         <tfoot>
  26.             {% if not cart.empty %}
  27.                 <tr>
  28.                     <th colspan="4" class="text-right">{{ 'cart.subtotal'|trans({}, 'frontend') }}</th>
  29.                     <th class="text-left">&euro; {{ cart.subtotal|price_format }}</th>
  30.                 </tr>
  31.                 {% if cart.order is not null %}
  32.                     {% if cart.order.discount is not null %}
  33.                         <tr>
  34.                             <th colspan="4" class="text-right">{{ 'cart.discount'|trans({}, 'frontend') }} <sup>({{ cart.order.discount.code }})</sup></th>
  35.                             <th class="text-left">&euro; {{ cart.discountPrice|price_format }}</th>
  36.                         </tr>
  37.                     {% endif %}
  38.                 {% endif %}
  39.                 <tr>
  40.                     <th colspan="4" class="text-right">{{ 'cart.shipping_costs'|trans({}, 'frontend') }}:</th>
  41.                     <th class="text-left">
  42.                         {% if cart.shippingCosts > 0 %}
  43.                             &euro; {{ cart.shippingCosts|price_format }}
  44.                         {% else %}
  45.                             <span class="free">{{ 'cart.free'|trans({}, 'frontend') }}</span>
  46.                         {% endif %}
  47.                     </th>
  48.                     <th></th>
  49.                 </tr>
  50.                 {% if cart.paymentCosts > 0 %}
  51.                     <tr>
  52.                         <th colspan="4" class="text-right">{{ 'cart.payment_costs'|trans({}, 'frontend') }}:</th>
  53.                         <th class="text-left">
  54.                             &euro; {{ cart.paymentCosts|price_format }}
  55.                         </th>
  56.                         <th></th>
  57.                     </tr>
  58.                 {% endif %}
  59.                 <tr>
  60.                     <th colspan="4" class="text-right">{{ 'cart.total'|trans({}, 'frontend') }}</th>
  61.                     <th class="text-left">&euro;  {{ cart.total|price_format }}</th>
  62.                     <th></th>
  63.                 </tr>
  64.             {% endif %}
  65.         </tfoot>
  66.     </table>
  67.     <div class="row">
  68.         <div class="col-12">
  69.             <a class="btn btn-primary" href="{{ path('home') }}">{{ 'cart.continue_shopping'|trans({}, 'frontend') }}</a>
  70.             {{ form_widget(form.submit, { attr: { class: 'btn btn-success float-right' }}) }}
  71.         </div>
  72.     </div>
  73.     {{ form_end(form) }}
  74. </div>