<div class="size-convertion-tabs" data-tabs="shoes-size">
   {foreach $sizes as $id => $values}
      <a href="#tabs-{$id|strip_accent}" class="nav-link{if $values@iteration == 1} active{/if}"
         data-tab-target="#tabs-{$id|strip_accent}" data-tabs="nav">
         {$id|upper}
      </a>
      <div class="size-convertion-tab-pane{if $values@iteration == 1} active{/if}" id="tabs-{$id|strip_accent}" data-tabs="content">
         {foreach $values as $variation_id => $size}
            {$variation = $body.product.variations.variations[$variation_id]}

            {* varianta je vyprodana a v adminu je vypnute zobrazovani vyprodanych produktu *}
            {if $variation.delivery_time_index != 0 and $dbcfg.prod_show_not_in_store == "N"}
               {continue}
            {elseif $variation.variation_figure != "Y"}
               {continue}
            {/if}

            {$soldout = true}

            {if $variation.delivery_time_index == 0}
               {* varianta je skladem *}
               {$soldout = false}
            {elseif $variation.delivery_time_index == -3 }
               {$soldout = false}
            {elseif $dbcfg.order_not_in_store == 'N' }
               {* varianta není skladem a je zakázáno kupování vyprodaných prod. v adminu *}
               {* $soldout je true *}
            {elseif $cfg.Products.allowSoldoutToCart[$variation.delivery_time_index] or
            ($cfg.Products.allowSoldoutToCart[1] and $variation.delivery_time_index > 0)}
               {* delivery_time_index varianty je povoleny v configu *}
               {$soldout = false}
            {/if}
            <input name="IDvariation_{$id|strip_accent}" type="radio" value="{$variation_id}"
                   id="var_{$id|strip_accent}_{$variation_id}"
                    {if $soldout and !findModule('watchdog')} disabled
                       {*{elseif $precheck_single and $body.product.variations.variations|count == 1 or $p == 1}checked{$p = $p + 1}*}{/if}
            >
            {* TODO: dirty fix z BE *}
            <label for="var_{$id|strip_accent}_{$variation_id}" data-variation-id="{$variation_id}" data-title="{$id|upper} {join(", ", $size)}"
                   class="product-variation-size-convertion {if $soldout}soldout {if findModule('watchdog')}watchdog{else}disable{/if}{/if}">
                  <span class="variation-title">
                     {* TODO: dirty fix z BE *}
                     {join(", ", $size)}
                  </span>

               {if !$hide_availability}
                  <span class="delivery delivery-{$delivery_var[$variation_id].deliveryTime}">
                     {$delivery_var[$variation_id].deliveryTimeText}
                     {if $delivery_var[$variation_id].inStore > 5}
                        >&nbsp;5&nbsp;{t}ks{/t}
                     {elseif $delivery_var[$variation_id].inStore > 1}
                        {$delivery_var[$variation_id].inStore}&nbsp;{t}ks{/t}
                     {elseif $delivery_var[$variation_id].inStore == 1}
                        {t}poslední kus{/t}
                     {/if}
                  </span>
               {/if}
            </label>
         {/foreach}
      </div>
   {/foreach}
</div>
