<div class="product-variations-header"><p class="h5">{t}Varianta{/t}</p></div>
<div class="product-variations" data-variations-quickbuy>
   {$i = 0}
   {foreach $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}


      {if !$soldout}
         {$i = $i + 1}
         {calc_product_discount product=$product variation=$variation assign='discount'}
         <input name="IDvariation" type="radio" value="{$variation.id}" id="var_{$variation.id}"
                data-price="{$variation.productPrice|format_price}"
                {if $discount.discount->asFloat() >= 1}data-price-common="{$discount.priceOriginal|format_price}"{/if} data-var-image="{$variation.photos[0].src}"
                {if $i == 1} checked{/if}>
         <label for="var_{$variation.id}" class="product-variation">
            <span class="variation-title">
               {foreach $variation.combinations as $index => $comb}
                  {$product.product.variations.labels[$comb.id_label].values[$comb.id_value]}
               {/foreach}
            </span>
         </label>
      {/if}
   {/foreach}
</div>
