{* @compiler:inline-only *}
{if $body.products}
   {ifmodule PRODUCT_GIFTS}
   {$body.productList->fetchGifts()}
   {/ifmodule}
   <div class="order-products order-products-summary">
      {foreach $body.products as $product}
         <div class="product">
            <div class="image">
               <a href="{url s=product IDproduct=$product.id TITLE=$product.title}"
                  title="{t}Zobrazit produkt{/t}">
                  {block 'image'}
                     <img src="{get_photo photo=$product.image size=4}" alt="{$product.title}"
                          class="img-responsive">
                  {/block}
               </a>
            </div>
            <div class="title">
                {block 'title'}
                   <a href="{url s=product IDproduct=$product.id TITLE=$product.title}{if $product.id_variation}#{$product.id_variation}{/if}"
                      title="{t}Zobrazit produkt{/t}">{$product.product.title}</a>
                    {if $product.id_variation}
                       <span class="variation">
                           {if $product.product.variationData.color}
                              <span class="colors colors-{$product.product.variationData.color|count}">
                                  {foreach $product.product.variationData.color as $color}
                                     <span style="background-color: #{$color}";></span>
                                  {/foreach}
                              </span>
                           {/if}
                           {$product.product.variationTitle}
                       </span>
                    {/if}

                    {if $product.product and $product.note}
                       <span class="variation">{$product.product->printNote($product.note)}</span>
                    {/if}
                    {ifmodule PRODUCTS_CHARGES}
                    {if $product.product}
                        {if $charges = $product.product->fetchCharges()}
                            {foreach $charges as $charge}
                                {if $product.note.charges[$charge.id] == 'Y'}
                                   <span class="variation">+ {$charge.title} ({$charge.price|format_price})</span>
                                {/if}
                            {/foreach}
                        {/if}
                    {/if}
                    {/ifmodule}
                {/block}
            </div>
            <div class="price-summary">
               {block 'price-total'}
                  <p class="price-total price-total-summary">
                     {$product.totalPriceWithDiscounts.value_with_vat|format_price}
                  </p>
               {/block}
               <p class="pieces-summary">
                   {$product.pieces|string_format:"%.{$product.product.unit.pieces_precision|default:0}f"}&nbsp;{$product.product.unit.short_name|default:"{t}ks{/t}"}
               </p>
            </div>
         </div>

          {ifmodule PRODUCT_GIFTS}
              {include "ordering/ordering.gifts.tpl" summary=1}
          {/ifmodule}
      {/foreach}

      {include "ordering/ordering.summary.gift.tpl"}
      {include "ordering/ordering.summary.charges.tpl"}
   </div>
{/if}
