{% set iva = app_helper_get_iva() %}
{% set tableAttributes = app_product_variants_attributes(data) %}
{% set variants = data.variants %}
{% do pimcore_head_link().appendStylesheet('/static2/css/basictable.css') %}
{% do pimcore_head_script().appendFile('/static2/js/jquery.basictable.min.js') %}
<div id="sizechart" class="mfpbox w-75 mfp-with-anim mfp-hide">
<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}}">
<thead style="background-color: white !important; color: black !important">
<tr>
<th>Ref.</th>
{% if tableAttributes | length > 0 %}
{% for field in tableAttributes %}
{% if field["name"] != "colorcard" and field["name"] != "shortdescription" and field["name"] != "longdescription" and field["name"] != "price" %}
<th>
{{ field["title"] |trans }}
</th>
{% endif %}
{% endfor %}
{% endif %}
{% if data.precios | length > 0 and ( product.marca != 15663 or is_authenticated) %}
<th>{{ "price" | trans }}*</th>
{% endif %}
{% if is_authenticated %}
<th></th>
{% endif %}
</tr>
</thead>
{% set brandExcluded = ['89'] %}
<tbody>
{% set rowId = 0 %}
{% for variant in variants %}
{% set rowId = rowId + 1 %}
<tr>
<td class="add_cart_manufactura">{{ variant.getManufacturercode() }}</td>
{% if tableAttributes | length > 0 %}
{% set continue = false %}
{% for field in tableAttributes %}
{% if field["name"] != "colorcard" and field["name"] != "shortdescription" and field["name"] != "longdescription" and field["name"] != "price" %}
{% set fieldData = app_product_variant_attribute_value(variant, field) %}
<td>{{ fieldData.value }}</td>
{% endif %}
{% endfor %}
{% endif %}
{% if data.precios | length > 0 and (product.marca != 15663 or is_authenticated) %}
{% set precioList = app_product_variant_prices(variant, iva) %}
<td>
{% if not (variant.getMarca in brandExcluded and not is_authenticated) and precioList.precioReal is not empty %}
{{ precioList.precioReal ~ ' €' }}
{% endif %}
</td>
{% endif %}
{% if is_authenticated %}
<td class="add_cart_padding">
<a href="#" class="btn btn-primary btn-ver-datatable rounded-3" style="filter: brightness(100%);" aria-current="page" id="{{ variant.getId() }}">
{{ 'product_detail.variant_table_view_translations' | trans }}
</a>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<button title="Close (Esc)" type="button" class="mfp-close">×</button>
</div>