templates/cart_webhosting/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.webhosting.html.twig' %}
  2. {% block title %}{{ 'cart'|trans }} {{ 'lang.webhosting'|trans }}{% endblock %}
  3. {% block body %}
  4.     <div id="output_delete_domain"></div>
  5.     <div id="output_delete_webhosting"></div>
  6.     <div class="container">
  7.         <div class="row justify-content-center">
  8.             <div class="col-8">
  9.                 <h2 class="py-2"><i
  10.                             class="fa-solid fa-cart-shopping"></i> {{ 'cart'|trans }} {{ 'lang.webhosting'|trans }}</h2>
  11.                 <div class="card p-4 rounded-5">
  12.                     {% if cart_product_webhosting.productWebhosting.id is defined and cart_domains_webhosting %}
  13.                         {% set total_domain = 0 %}
  14.                         {% for domain in cart_domains_webhosting %}
  15.                             {% set total_domain = total_domain + domain['price'] %}
  16.                         {% endfor %}
  17.                         {% include 'cart_webhosting/_partials/domain.html.twig' %}
  18.                         {% set product_price = cart_product_webhosting.productWebhosting.packagePrice %}
  19.                         {% include 'cart_webhosting/_partials/product.html.twig' %}
  20.                     {% else %}
  21.                         {{ 'txtNoWebhosting'|trans }}
  22.                     {% endif %}
  23.                     {% if cart_product_webhosting.productWebhosting.id is defined and cart_domains_webhosting %}
  24.                         {% set total = total_domain + product_price %}
  25.                         <div class="row size-16">
  26.                             <hr>
  27.                             <div class="col-md-6 mb-2">
  28.                                 <span class="text-danger">{{ advice|default('') }}</span><br>
  29.                                 {{ btn_webhosting|default('') }}
  30.                             </div>
  31.                             {% set vatPrice = vat_value * total %}
  32.                             {% set totalPriceGross = vat_value * total + total %}
  33.                             <div class="col-md-6 mb-2">
  34.                                 <div class="row">
  35.                                     <div class="col">
  36.                                         <span class="float-end">
  37.                                             {{ total|number_format(2,",",".") }} &euro; / {{ 'perMonth'|trans }}
  38.                                         </span>
  39.                                     </div>
  40.                                 </div>
  41.                                 <div class="row">
  42.                                     <div class="col">
  43.                                         <span class="float-end">
  44.                                             {{ 'totalVat'|trans }} {{ vat_value * 100 }}%: {{ vatPrice|number_format(2,",",".") }} &euro;
  45.                                         </span>
  46.                                     </div>
  47.                                 </div>
  48.                                 <div class="row">
  49.                                     <div class="col">
  50.                                         <span class="float-end">
  51.                                             {{ 'totalPriceGross'|trans }}:
  52.                                             <strong>{{ totalPriceGross|number_format(2,",",".") }} &euro;</strong>
  53.                                         </span>
  54.                                     </div>
  55.                                 </div>
  56.                             </div>
  57.                         </div>
  58.                         {% if app.user %}
  59.                             <div class="row">
  60.                                 <div class="col mb-2">
  61.                                     <a href="{{ path('app_client_payment_new', {'webhosting': 1}) }}"
  62.                                        class="btn btn-success w-100">{{ 'goToPayment'|trans }}</a>
  63.                                 </div>
  64.                             </div>
  65.                         {% else %}
  66.                             <div class="row">
  67.                                 <div class="col mb-2">
  68.                                     <a href="{{ path('app_register', {'webhosting': 1}) }}"
  69.                                        class="btn btn-success w-100">{{ 'forwartToRegisterClient'|trans }}</a>
  70.                                 </div>
  71.                             </div>
  72.                             <div class="row">
  73.                                 <div class="col mb-2">
  74.                                     <h6 class="text-center">{{ 'txtOr'|trans }}</h6>
  75.                                 </div>
  76.                             </div>
  77.                             <div class="row">
  78.                                 <div class="col mb-2">
  79.                                     <a href="{{ path('app_login', {'webhosting': 1}) }}"
  80.                                        class="btn btn-success w-100">{{ 'forwartToLogin'|trans }}</a>
  81.                                 </div>
  82.                             </div>
  83.                         {% endif %}
  84.                     {% endif %}
  85.                 </div>
  86.             </div>
  87.         </div>
  88.     </div>
  89. {% endblock %}
  90. {% block javascripts %}
  91.     <script>
  92.         function removeDomain(id) {
  93.             $('#output_delete_domain').load('{{ path('app_cart_webhosting_remove_domain') }}?id=' + id, function () {
  94.                 window.location.reload();
  95.             })
  96.         }
  97.         function removeWebhosting(id) {
  98.             $('#output_delete_webhosting').load('{{ path('app_cart_webhosting_remove_webhosting') }}', function () {
  99.                 window.location.reload();
  100.             })
  101.         }
  102.     </script>
  103. {% endblock %}