<p class="title-default" data-payment-error>{t}Platba{/t}</p>
<div class="cart-box" {*data-reload="payment"*}>

   {foreach $payments as $id => $payment}
      {if !$payment.class->hasCartTemplate()}
         <div class="cart-box-row payment-item payment-item-{$payment.class.class|lower} {if $payment.disabled}disabled{/if}
            {if $payment.exception}disabled exception{/if}" data-cart="item">

            <label for="pay{$id}" class="delivery-content custom-radio custom-control">
               <input type="radio" name="payment_id" value="{$id}" id="pay{$id}" class="custom-control-input"
                      {if !$payment.exception}{$body.payment_id|checked:$id nofilter}{else}disabled data-exception="1"{/if}
                       {if $payment.disabled}disabled{/if}>
               <span class="custom-control-indicator"></span>
               {if $payment.class.class == "OmnipayNestpay"}
                  <span class="img"> <img src="/static/images/card{$ctrl.active_language|upper}.jpg" alt=""></span>
               {elseif $payment.photo}
                  <span class="img">{photo photo=$payment.photo}</span>
               {/if}

               <span class="name">
                  <strong>{$payment.name}</strong>
                  <span data-reload="payment_exception_{$id}">
                     {if $payment.exception}
                        <span class="subtitle">{$payment.exception->getShortMessage()}</span>
                     {/if}
                     {if $payment.cart_description}
                        <span class="subtitle">{$payment.cart_description nofilter}</span>
                     {/if}
                  </span>
               </span>

               <span class="price">
                  <span data-reload="payment_price_{$id}">
                     {block "ordering-payment-price"}
                        {$paymentPrice = $view->getPaymentPrice($id)}
                        {$paymentPrice.value_with_vat|format_price}
                     {/block}
                  </span>
               </span>
            </label>


         </div>
      {else}
         <div class="payment-item-{$payment.class.class|lower|strip_accent} {if $payment.disabled}disabled{/if}
            {if $payment.exception}disabled exception{/if}" data-cart="item">
            {get_smarty assign='smarty_object'}
            {$payment.class->getCartTitle($smarty_object) nofilter}
         </div>
      {/if}
   {/foreach}

   {insert_page code="poznamka_platba" exists='exists' assign='no_cod_exists'}
   {if $no_cod_exists}
      {$no_cod_exists.content nofilter}
   {/if}
</div>
