73 lines
3.1 KiB
Smarty
73 lines
3.1 KiB
Smarty
<div class="delivery-country">
|
|
<p class="title-default" data-delivery-error>{t}Doprava{/t}</p>
|
|
|
|
{if $tpl_vars.delivery_country_picker}
|
|
{block 'country-picker'}
|
|
<div class="delivery-country-select">
|
|
{get_contexts country=1 assign='contexts'}
|
|
{$activeCountry = $contexts.country->getActive()}
|
|
<span class="country-flag" style="background-image: url('/common/static/images/flags/{$activeCountry.id|lower}.svg')"></span>
|
|
<select class="form-control" name="delivery-country" id="delivery-country">
|
|
{foreach $contexts.country->getAll() as $country}
|
|
<option value="{$country->getId()}"
|
|
{if $country->getId() == $activeCountry->getId()}selected{/if}>{$country->getName()}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
{/block}
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="cart-box">
|
|
{foreach $deliveries as $id => $delivery}
|
|
<div class="cart-box-row delivery-item {if $delivery.exception}disabled{/if}" data-cart="item">
|
|
|
|
<label for="del{$id}" class="custom-radio custom-control delivery-content">
|
|
<input type="radio" name="delivery_id" value="{$id}" id="del{$id}" class="custom-control-input"
|
|
{if $delivery.exception and $delivery.exception->isDeliveryDisabled()}disabled{elseif $body.delivery_id == $id}checked{/if}>
|
|
<span class="custom-control-indicator"></span>
|
|
{if $delivery.photo}
|
|
<span class="img">{photo photo=$delivery.photo}</span>
|
|
{/if}
|
|
<span class="name">
|
|
<strong>{$delivery.name}</strong>
|
|
<span class="subtitle">
|
|
{if $delivery.exception}
|
|
{$delivery.exception->getShortMessage()}
|
|
{elseif $availability == 1}
|
|
{$date = $delivery->getDeliveryDate()}
|
|
{if $date and $delivery->isInPerson()}
|
|
{t dne=$date|format_date_pretty escape=false}K vyzvednutí {dne}{/t}
|
|
{elseif $date}
|
|
{t dne=$date|format_date_pretty escape=false}Doručíme {dne}{/t}
|
|
{/if}
|
|
{/if}
|
|
</span>
|
|
</span>
|
|
|
|
<span class="price">
|
|
{block "ordering-delivery-price"}
|
|
{$deliveryPrice = $view->getDeliveryPrice($id)}
|
|
{if !$delivery.exception}
|
|
{$deliveryPrice.value_with_vat|format_price}
|
|
{/if}
|
|
{/block}
|
|
</span>
|
|
</label>
|
|
|
|
{$templateDescription = $delivery->getCartDescription()} {* vlastni sablona v enginu *}
|
|
{$customDescription = $delivery->cart_description} {* vlastni popis z adminu *}
|
|
|
|
{if $templateDescription or $customDescription}
|
|
<div class="delivery_description" id="delivery_description_{$delivery.id}" style="display: none;">
|
|
{if $templateDescription}
|
|
{$templateDescription nofilter}
|
|
{else}
|
|
{$customDescription nofilter}
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{/foreach}
|
|
</div>
|