{if !$free_delivery}
   {get_stats type='free_delivery' assign='free_delivery'}
{/if}

{if $free_delivery and $free_delivery->isPositive() and $cartPrice}
   <div class="shipping-progress"{if $ordering} data-reload="cart-shipping-progress"{/if}>
      <span class="fc {$fonticon|default:"icons_delivery"}"></span>
      <p>
         {if $free_delivery->lowerThanOrEqual($cartPrice) or $body.freeShipping or $cartInfo.freeShipping}
            {t}Dopravu máte zdarma{/t}
         {else}
            {t}K dopravě zdarma zbývá{/t}
            {$free_delivery->sub($cartPrice)|format_price:"ceil=no;decimal=dynamic"}
         {/if}
      </p>

      <div class="shipping-bar">
         {if $free_delivery->lowerThanOrEqual($cartPrice) or $body.freeShipping or $cartInfo.freeShipping}
            <span></span>
         {else}
            {$barwidth=($cartPrice->div($free_delivery)->asFloat())*100}
            <span style="width: {$barwidth|round}%"></span>
         {/if}
      </div>
   </div>
{/if}
<div class="cart-badges">
   {*<p><span class="fc icons_gps"></span>{t}Můžete mít už dnes na naší prodejně{/t}</p>*}
   <p><span class="fc icons_credit-card"></span>{t}Bezpečná a rychlá platba online{/t}</p>
</div>
