{if $body.product.variations.labels[11]}
   {include "product/product.variations.size-convertion.tpl" id_convertor=1}
{elseif $body.product.variations.labels[18]}
   {include "product/product.variations.size-convertion.tpl" id_convertor=2}
{else}
   <div data-variations="variations-ajax">
      <div class="product-variations-header">
         <p data-variation-error="title">
            {foreach $body.product.variations.labels as $index => $label}{$label.label}{/foreach}
         </p>
         {if $sizeTables}
            <a href="#sizetable" data-focus-opener="product-sizetable">
               {t}Tabulka velikostí{/t}
            </a>
         {/if}
      </div>
      <script>
         wpj.variations = {ldelim}{rdelim};
      </script>

      {$precheck_single = true}
      {$p = 1}

      <div class="product-variations">
         {foreach $body.product.variations.variations as $variation}
            {* 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}
            {/if}

            {$soldout = true}

            {if $variation.delivery_time_index == 0}
               {* varianta je skladem *}
               {$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" type="radio" value="{$variation.id}" id="var_{$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}
            >
            <label for="var_{$variation.id}"
                   class="product-variation {if $soldout}soldout {if findModule('watchdog')}watchdog{else}disable{/if}{/if}">
               <span class="variation-title">
                  {foreach $variation.combinations as $index => $comb}
                     {$body.product.variations.labels[$comb.id_label].values[$comb.id_value]}
                  {/foreach}
               </span>
            </label>
         {/foreach}
      </div>
   </div>
{/if}
