{block "product-rows"}
   <div class="catalog-row" {if $body.pager}data-page="{$body.pager.number}" data-products-row{/if} data-notify-product-wrapper
        data-tracking-view='{get_gtm_data encode=true type='ecommerce' method='ProductsImpressions' data=['products' => $products, 'listType' => $listType, 'listId' => $listId]}'>
       {foreach $products as $product}
           {$product->fetchVariations()|silent}
           {$product->fetchParameters()|silent}
           {calc_product_discount product=$product assign='discount'}
          <div class="catalog-list-item catalog-variations-wrapper col-xxs-12">
             <a href="{url s=product IDproduct=$product.id TITLE=$product.title}{$hash}" title="{$product.title}" class="title-catalog">
                 {$product.title}
             </a>

             <div class="catalog-content-variations {if !$product.variations}no-variations{/if}">
                <a href="{url s=product IDproduct=$product.id TITLE=$product.title}{$hash}" title="{$product.title}"
                   class="catalog-list-item-image">
                   <div class="catalog-image img">
                      <img src="{get_photo photo=$product.image size=22}" alt="{$product.title}" class="img-responsive">
                   </div>
                </a>
                <div class="variations-variations">
                    {if $product.variations}
                        {foreach $product.variations as $variation}
                           <div class="var">
                              <div class="variations-content-wrapper">
                                 <div class="package">
                                    <span>{t}Balení{/t}</span>
                                    <p>
                                       <strong>{$variation.value}</strong>
                                    </p>
                                 </div>
                                 <div class="apply">
                                    <span>{t}Množství účinné látky{/t}</span>
                                    <p>{$variation.value_22}</p>
                                 </div>
                                 <div class="code">
                                    <span>{t}Kód{/t}</span>
                                    <p class="code">{$variation.code}</p>
                                 </div>
                                 <div class="ean">
                                    <span>{t}EAN{/t}</span>
                                    <p>{$variation.ean}</p>
                                 </div>
                                  {*<div class="pieces">
                                     <span>{t}Počet v balení{/t}</span>
                                     <p>{t}500ks{/t}</p>
                                  </div>*}
                              </div>

                              <div class="price-list-b2b">
                                 <div class="price">
                                    <div class="product-price-block price-block-b2b">
                                       <div class="without-vat">
                                          <p class="price-common">{$variation.price.value_without_vat|format_price}</p>
                                          <p class="novat">{t}bez DPH{/t}</p>
                                       </div>

                                       <div class="with-vat">
                                          <p>{t}DPC{/t}</p>
                                          <p>{$variation.priceOriginal|format_price}</p>
                                          <p>{t} s DPH{/t}</p>
                                       </div>
                                    </div>
                                 </div>

                                 <div class="catalog-list-item-form-wrapper">
                                     {if !$product->isold()}
                                        <form action="{url s=cart}" method="get" data-buy-form>
                                           <input type="hidden" name="act" value="add">
                                           <input type="hidden" name="redir" value="1">
                                           <input type="hidden" name="IDproduct" value="{$product.id}">
                                            {include 'components/block.product.submit-block.tpl' icon=true}
                                           <input name="IDvariation" type="hidden" value="{$variation.id}" id="var_{$variation.id}">
                                        </form>
                                     {/if}
                                 </div>
                              </div>
                           </div>
                        {/foreach}
                    {else}
                       <div class="var">
                          <div class="variations-content-wrapper">
                             <div class="package">
                                <span>{t}Balení{/t}</span>
                                <p>
                                   <strong>{if $product.sets}{$product.sets[0].set_pieces}x{$product.param[32].value}{$product.param[32].unit} {else}{$product.param[29].value}{$product.param[29].unit}{/if}</strong>
                                </p>
                             </div>
                             <div class="apply">
                                <span>{t}Množství účinné látky{/t}</span>
                                <p>{$product.param[31].value}</p>
                             </div>
                             <div class="code">
                                <span>{t}Kód{/t}</span>
                                <p class="code">{$product.code}</p>
                             </div>
                             <div class="ean">
                                <span>{t}EAN{/t}</span>
                                <p>{$product.ean}</p>
                             </div>
                              {*<div class="pieces">
                                 <span>{t}Počet v balení{/t}</span>
                                 <p>{t}500ks{/t}</p>
                              </div>*}
                          </div>

                          <div class="price-list-b2b">
                             <div class="price">
                                <div class="product-price-block price-block-b2b">
                                   <div class="without-vat">
                                      <p class="price-common">{$product.price_array.value_without_vat|format_price}</p>
                                      <p class="novat">{t}bez DPH{/t}</p>
                                   </div>

                                   <div class="with-vat">
                                      <p>{t}DPC{/t}</p>
                                      <p>{$product.priceOriginal|format_price}</p>
                                      <p>{t} s DPH{/t}</p>
                                   </div>
                                </div>
                             </div>

                             <div class="catalog-list-item-form-wrapper">
                                 {if !$product.variations.variations && !$product->isold()}
                                    <form action="{url s=cart}" method="get" data-buy-form>
                                       <input type="hidden" name="act" value="add">
                                       <input type="hidden" name="redir" value="1">
                                       <input type="hidden" name="IDproduct" value="{$product.id}">
                                        {include 'components/block.product.submit-block.tpl' icon=true}
                                    </form>
                                 {else}
                                    <div class="detail-link">
                                       <a href="{url s=product IDproduct=$product.id search=$header.searchString TITLE=$product.title}"
                                          class="btn btn-primary btn-block">
                                           {t}Zobrazit varianty{/t}
                                       </a>
                                    </div>
                                 {/if}
                             </div>
                          </div>
                       </div>
                    {/if}
                </div>
             </div>
          </div>
       {/foreach}
   </div>
{/block}
