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

49 lines
1.9 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="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"></span>
<img src="https://www.thepay.cz/gate/images/logos/public/209x127/{$name}.png" style="width: 75px; height: auto;" title="{$method.name}">
<span class="nowrap">{$method.name}</span>
</label>
</div>
<div class="display-cell delivery-price text-right">
{$payment.price.value_with_vat|format_price}
</div>
</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 btn-primary--green" id="thepay-more">{t}Více{/t}</a>
</div>
</div>
{/if}
{/foreach}
<script>
wpj.onReady.push(function () {
$('#thepay-more').on('click', function () {
$(this).parent().parent().hide();
$('.payment-item-small').hide();
$('.payment-item.hidden').fadeIn();
return false;
});
});
</script>