41 lines
2.0 KiB
Smarty
41 lines
2.0 KiB
Smarty
<section v="{$version}">
|
|
<script type="text/javascript">
|
|
function reformatPrice(price) {
|
|
if (price.length === 0) {
|
|
return false;
|
|
}
|
|
|
|
return parseFloat(price.replace(',', '.').replace(/\s+/g, ''));
|
|
}
|
|
|
|
function PoliczRateCA() {
|
|
let price = reformatPrice('{$total_sym}');
|
|
if (price !== false) {
|
|
window.open('https://ewniosek.credit-agricole.pl/eWniosek/simulator.jsp?PARAM_TYPE=RAT&PARAM_PROFILE={$psp}&PARAM_CREDIT_AMOUNT=' + price + '{if isset($caraty_offer_id)}{if $caraty_offer_id != ''}&offerId={$caraty_offer_id}{/if}{/if}', 'Policz_rate', "toolbar=yes,scrollbars=yes,resizable=yes");
|
|
}
|
|
}
|
|
</script>
|
|
{if $nbProducts <= 0}
|
|
<p class="warning">{l s='Twój koszyk jest pusty.' mod='caraty' }</p>
|
|
{else}
|
|
<h3>{l s='Wybrałeś formę płatności CA Raty.' mod='caraty'}</h3>
|
|
<h5>{l s='Podsumowanie zamówienia:' mod='caraty'}</h5>
|
|
<p>{l s='Całkowita wartość zamówienia: ' mod='caraty'}{$total}</p>
|
|
<p>
|
|
<b>{l s='Przeprowadź symulację wysokości raty klikając Oblicz Ratę' mod='caraty'}.</b>
|
|
<br>
|
|
<small>{l s='Informacje niezbędne do zakupu na raty zostaną przedstawione na kolejnej stronie' mod='caraty'} </small>
|
|
<br>
|
|
<a onclick="return PoliczRateCA();"
|
|
style="cursor: pointer; position: relative; z-index: 15" target="raty_symulator" title="Kupuj na Raty!">
|
|
{if isset($caraty_logo_auto)}
|
|
<img id="caraty_img_auto" src="{$caraty_logo_auto.url}?creditAmount={$total_sym}&posId={$psp}&imgType={$caraty_logo_auto.type}{if isset($caraty_offer_id)}{if $caraty_offer_id != ''}&offerId={$caraty_offer_id}{/if}{/if}"
|
|
style="margin: 0;">
|
|
{else}
|
|
<img alt="" src="{$caraty_logo_calc}" style="margin: 0;">
|
|
{/if}
|
|
</a>
|
|
</p>
|
|
{/if}
|
|
</section>
|