{{ sonata_block_render_event('sylius.shop.product.show.tab_attributes', {'product': product}) }}
{#
<h5 class="ui horizontal divider header">
{{ 'Specifications'|trans }}
<i class="box icon"></i>
</h5>
#}
<table id="sylius-product-attributes" class="ui definition table">
<tbody>
{% if product.variants is defined %}
{% set variant = product|sylius_resolve_variant %}
{% if variant is not null and variant.depth is not null and variant.width is not null and variant.height is not null %}
{% set sizestring = formatsize(variant.depth, variant.width, variant.height) %}
{% else %}
{% set sizestring = 'N/A' %}
{% endif %}
{% if sizestring is not null and sizestring is not empty %}
<tr>
<td class="sylius-product-attribute-name">
{{ "dimensions"|trans }}</td>
<td class="sylius-product-attribute-value">
{{ sizestring }}
</td>
</tr>
{% endif %}
{% if variant is not null and variant.weight is not null %}
{% set poid = formatweight(variant.weight) %}
{% else %}
{% set poid = 'N/A' %}
{% endif %}
{% if poid is not null and poid is not empty %}
<tr>
<td class="sylius-product-attribute-name">
{{ "weight"|trans }}</td>
<td class="sylius-product-attribute-value">
{{ poid }}
</td>
</tr>
{% endif %}
{% endif %}
{% for attribute in product.getAttributesByLocale(configuration.request.locale, configuration.request.defaultLocale, sylius_base_locale)|sort_by('attribute.position') %}
<tr>
<td class="sylius-product-attribute-name">{{ attribute.name }}</td>
<td class="sylius-product-attribute-value">
{% include [('@SyliusAttribute/Types/'~attribute.attribute.type~'.html.twig'), '@SyliusAttribute/Types/default.html.twig'] with {'attribute': attribute, 'locale': configuration.request.locale, 'fallbackLocale': configuration.request.defaultLocale} %}
</td>
</tr>
{% endfor %}
</tbody>
</table>