55 lines
2.3 KiB
Smarty
55 lines
2.3 KiB
Smarty
{$closed = $body.payment_id|strpos:{$payment.id|cat:'-'} !== 0}
|
|
|
|
{foreach $object->getAvailableMethods() as $name => $method}
|
|
<div class="payment-item display-row {$name} {if $method@index > 1 && $closed}hidden" style="display: none;{/if}" data-cart="item">
|
|
<div class="display-cell">
|
|
{$method_id = "{$id}-{$name}"}
|
|
<label class="c-input c-radio custom-radio custom-control" for="pay{$method_id}">
|
|
<input type="radio" name="payment_id" value="{$method_id}" class="custom-control-input" id="pay{$method_id}" {$body.payment_id|checked:$method_id nofilter}>
|
|
<span class="custom-control-indicator c-indicator"></span>
|
|
<img src="https://www.thepay.cz/gate/images/logos/public/209x127/{$name}.png" style="width: 75px; height: auto;" title="{$method.name}">
|
|
{block "method-name"}
|
|
<span class="nowrap">{$method.name}</span>
|
|
{/block}
|
|
</label>
|
|
</div>
|
|
|
|
{block "cart-payment-price-ThePay"}
|
|
<div class="display-cell delivery-price text-right">
|
|
{$paymentPrice = $view->getPaymentPrice($id)}
|
|
{if $paymentPrice && $paymentPrice.value_with_vat->isPositive()}
|
|
{$paymentPrice.value_with_vat|format_price}
|
|
{else}
|
|
{t}zdarma{/t}
|
|
{/if}
|
|
</div>
|
|
{/block}
|
|
</div>
|
|
{if $method@index == 1 && $closed}
|
|
<div class="payment-item display-row payments-list">
|
|
<div class="display-cell">
|
|
{foreach $object->getAvailableMethods() as $name => $method}
|
|
{if $method@index > 1}
|
|
<img src="https://www.thepay.cz/gate/images/logos/public/209x127/{$name}.png" style="width: 60px; height: auto; margin: 5px 0;"
|
|
title="{$method.name}" class="payment-item-small">
|
|
{/if}
|
|
{/foreach}
|
|
</div>
|
|
<div class="display-cell">
|
|
<a href="" class="thepay-more btn btn-primary" id="thepay-more">{t}Více{/t}</a>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{/foreach}
|
|
|
|
<script>
|
|
wpj.onReady.push(function() {
|
|
$('#cart').on('click', '#thepay-more', function() {
|
|
|
|
$(this).closest('.payments-list').hide();
|
|
$('.payment-item.hidden').removeClass('hidden').fadeIn();
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|