Files
kupshop/web/common/templates/payment.GoPay.cart.tpl
2025-08-02 16:30:27 +02:00

54 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 $payment.disabled}disabled{/if} {if $payment.exception}disabled exception{/if} {if $method@index > 1 and $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="{$method.image}" title="{$method.name}" alt="{$method.name}" class="payment-item-lg">
<span class="nowrap">{block "method-name"}{$method.name}{/block}</span>
</label>
</div>
<div class="display-cell delivery-price text-right">
{block "payment-price"}
{if $payment.price.value_with_vat->isPositive()}
{$payment.price.value_with_vat|format_price}
{else}
{t}zdarma{/t}
{/if}
{/block}
</div>
</div>
{if $method@index == 1 and $closed and !$method@last}
<div class="payment-item display-row payments-list">
<div class="display-cell">
{foreach $object->getAvailableMethods() as $name => $method}
{if $method@index > 1}
<img src="{$method.image}" title="{$method.name}" alt="{$method.name}" class="payment-item-small">
{/if}
{/foreach}
</div>
<div class="display-cell">
<a href="" class="thepay-more btn btn-primary" id="gopay-more" title="{t}Zobrazit více platebních metod{/t}">{t}Více{/t}</a>
</div>
</div>
{/if}
{/foreach}
<script type="text/javascript">
wpj.onReady.push(function() {
$('body').on('click', '#gopay-more', function() {
$(this).closest('.payments-list').hide();
$('.payment-item.hidden').removeClass('hidden').fadeIn();
return false;
});
});
</script>