templates/Shop/includes/articletable2.html.twig line 1

Open in your IDE?
  1. {% set iva = app_helper_get_iva() %}
  2. {% set tableAttributes = app_product_variants_attributes(data) %}
  3. {% set variants = data.variants %}
  4. {% do pimcore_head_link().appendStylesheet('/static2/css/basictable.css') %}
  5. {% do pimcore_head_script().appendFile('/static2/js/jquery.basictable.min.js') %}
  6. <div id="sizechart" class="mfpbox w-75 mfp-with-anim mfp-hide">
  7.     <div class="table-responsive px-1 pt-5"> <table id="variantsTable" class="variantsTable table table-striped table-hover table-bordered align-middle" data-variant-count="{{variants|length}}">
  8.             <thead style="background-color: white !important; color: black !important">
  9.             <tr>
  10.                 <th>Ref.</th>
  11.                 {%  if tableAttributes | length > 0 %}
  12.                     {% for field in tableAttributes %}
  13.                         {% if field["name"] != "colorcard" and field["name"] != "shortdescription" and field["name"] != "longdescription" and field["name"] != "price" %}
  14.                             <th>
  15.                                 {{ field["title"] |trans }}
  16.                             </th>
  17.                         {% endif %}
  18.                     {% endfor %}
  19.                 {% endif %}
  20.                 {% if data.precios | length > 0 and ( product.marca != 15663 or is_authenticated) %}
  21.                     <th>{{ "price" | trans }}*</th>
  22.                 {% endif %}
  23.                 {% if is_authenticated %}
  24.                     <th></th>
  25.                 {% endif %}
  26.             </tr>
  27.             </thead>
  28.             {% set brandExcluded = ['89'] %}
  29.             <tbody>
  30.             {% set rowId = 0 %}
  31.             {%  for variant in variants %}
  32.                 {% set rowId = rowId + 1 %}
  33.                 <tr>
  34.                     <td class="add_cart_manufactura">{{ variant.getManufacturercode() }}</td>
  35.                     {%  if tableAttributes | length > 0 %}
  36.                         {% set continue = false %}
  37.                         {% for field in tableAttributes %}
  38.                             {% if field["name"] != "colorcard" and field["name"] != "shortdescription" and field["name"] != "longdescription" and field["name"] != "price" %}
  39.                                 {% set fieldData = app_product_variant_attribute_value(variant, field) %}
  40.                                 <td>{{ fieldData.value }}</td>
  41.                             {% endif %}
  42.                         {% endfor %}
  43.                     {% endif %}
  44.                     {% if data.precios | length > 0 and (product.marca != 15663 or is_authenticated) %}
  45.                         {% set precioList = app_product_variant_prices(variant, iva) %}
  46.                         <td>
  47.                             {% if not (variant.getMarca in brandExcluded and not is_authenticated) and precioList.precioReal is not empty %}
  48.                                 {{ precioList.precioReal ~ ' €' }}
  49.                             {% endif %}
  50.                         </td>
  51.                     {% endif %}
  52.                     {% if is_authenticated %}
  53.                         <td class="add_cart_padding">
  54.                             <a href="#" class="btn btn-primary btn-ver-datatable rounded-3" style="filter: brightness(100%);" aria-current="page" id="{{ variant.getId() }}">
  55.                                 {{ 'product_detail.variant_table_view_translations' | trans }}
  56.                             </a>
  57.                         </td>
  58.                     {% endif %}
  59.                 </tr>
  60.             {% endfor %}
  61.             </tbody>
  62.         </table>
  63.     </div>
  64.     <button title="Close (Esc)" type="button" class="mfp-close">×</button>
  65. </div>