186 lines
5.9 KiB
Smarty
Executable File
186 lines
5.9 KiB
Smarty
Executable File
{*
|
|
* 2007-2011 PrestaShop
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* http://opensource.org/licenses/afl-3.0.php
|
|
* If you did not receive a copy of the license and are unable to
|
|
* obtain it through the world-wide-web, please send an email
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
|
*
|
|
* DISCLAIMER
|
|
*
|
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
|
* versions in the future. If you wish to customize PrestaShop for your
|
|
* needs please refer to http://www.prestashop.com for more information.
|
|
*
|
|
* @author PrestaShop SA <contact@prestashop.com>
|
|
* @copyright 2007-2011 PrestaShop SA
|
|
* @version Release: $Revision: 8088 $
|
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
|
* International Registered Trademark & Property of PrestaShop SA
|
|
*}
|
|
|
|
{if !$opc}
|
|
<script type="text/javascript">
|
|
// <![CDATA[
|
|
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
|
|
var currencyRate = '{$currencyRate|floatval}';
|
|
var currencyFormat = '{$currencyFormat|intval}';
|
|
var currencyBlank = '{$currencyBlank|intval}';
|
|
var txtProduct = "{l s='product'}";
|
|
var txtProducts = "{l s='products'}";
|
|
// ]]>
|
|
{literal}
|
|
// Function to submit payment and send the information to GA
|
|
function submitPayment(){
|
|
$input = $('input[name="paiement-method"]:checked');
|
|
if(!$input.length) {
|
|
alert(paiementErrorMessage);
|
|
}
|
|
if ($input.val()) {
|
|
// LOADER POUR PAYBOX
|
|
if ($input.attr('data-module-name') == "paybox-direct"){
|
|
$('.overlay_bbb').fadeIn();
|
|
$('.box_paybox').fadeIn();
|
|
}
|
|
if (window.ga && ga.create){
|
|
// redirect by GA send event
|
|
onStepComplete(4, $input.attr('data-module-name') ,$input.val(),null);
|
|
} else {
|
|
window.location = $input.val();
|
|
}
|
|
} else {
|
|
if($input.attr('data-module-name') == "paybox"){
|
|
if(!$('input#save_info_paybox:checked').length){
|
|
$form = $input.parent().children('form#paybox_form');
|
|
} else {
|
|
$form = $input.parent().children('form#paybox_form_save');
|
|
}
|
|
$name = "paybox";
|
|
} else {
|
|
$form = $input.parent().children('div.hidden').children('form');
|
|
$name = $form.attr('data-module-name');
|
|
// LOADER POUR PAYPAL
|
|
if ($input.attr('data-module-name') == "paypal") {
|
|
$('.overlay_bbb').fadeIn();
|
|
$('.box_paypal').fadeIn();
|
|
$name = 'paypal';
|
|
}
|
|
}
|
|
if (window.ga && ga.create){
|
|
// submit form by GA send event
|
|
onStepComplete(4, $name,null,$form);
|
|
} else {
|
|
$form.submit();
|
|
}
|
|
}
|
|
}
|
|
{/literal}
|
|
</script>
|
|
|
|
{capture name=path}{l s='Your payment method'}{/capture}
|
|
{include file="$tpl_dir./breadcrumb.tpl"}
|
|
{/if}
|
|
|
|
{if !$opc}
|
|
{assign var='current_step' value='payment'}
|
|
<div id="title_block"><h1>{l s='Choose your payment method'}</h1></div>
|
|
{include file="$tpl_dir./order-steps.tpl"}
|
|
|
|
{include file="$tpl_dir./errors.tpl"}
|
|
{else}
|
|
<h2>3. {l s='Choose your payment method'}</h2>
|
|
<div id="opc_payment_methods" class="opc-main-block">
|
|
<div id="opc_payment_methods-overlay" class="opc-overlay" style="display: none;"></div>
|
|
{/if}
|
|
|
|
<div id="HOOK_TOP_PAYMENT">{$HOOK_TOP_PAYMENT}</div>
|
|
|
|
{if $HOOK_PAYMENT}
|
|
{if !$opc}<p id="payment-paragraphe">{l s='Please select your preferred payment method to pay the amount of'} <span class="price">{convertPrice price=$total_price} <span class="taxes">{if $taxes_enabled}{l s='(tax incl.)'}</span>{/if}</span> {if $site_version=='es'}{l s='El pago es totalmente seguro.'}{/if}</p>{/if}
|
|
{if $opc}<div id="opc_payment_methods-content">{/if}
|
|
<div id="HOOK_PAYMENT">{$HOOK_PAYMENT}</div>
|
|
{if $opc}</div>{/if}
|
|
{else}
|
|
<p class="warning">{l s='No payment modules have been installed.'}</p>
|
|
{/if}
|
|
|
|
{if !$opc}
|
|
<p class="cart_navigation">
|
|
<a href="{$link->getPageLink('order.php', true)}?step=2" title="{l s='Previous'}" class="button">{l s='Previous'}</a>
|
|
<a class="exclusive submitPayment" title="{l s='Valider ma commande'}" class="button" onclick="submitPayment(); return ((window.ga && ga.create)? !ga.loaded : true);">{l s='Valider ma commande'}</a>
|
|
</p>
|
|
{else}
|
|
</div>
|
|
{/if}
|
|
|
|
|
|
|
|
<div class="overlay_bbb" style="display: none;"></div>
|
|
<div class="box_add_to_cart box_paypal" style="display: none;">
|
|
<div class="content">
|
|
<p style="text-align: center;">
|
|
<img src="/modules/paypal/img/logos/FR_pp_cc_mark_74x46.jpg" alt="">
|
|
<br />
|
|
<span>{l s='Paiement en cours, veuillez patienter'}</span>
|
|
<br />
|
|
<img src="img/loader_payment.gif" alt="">
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box_add_to_cart box_paybox" style="display: none;">
|
|
<div class="content">
|
|
<p style="text-align: center;">
|
|
<img src="/modules/paybox/paiement_{$cookie->id_lang}.png" alt="">
|
|
<br />
|
|
<span>{l s='Paiement en cours, veuillez patienter'}</span>
|
|
<br />
|
|
<img src="img/loader_payment.gif" alt="">
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
var paiementErrorMessage = "{l s='You have to choose a paiement method' js=1}";
|
|
</script>
|
|
{literal}
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('.payment_module .inner').live('click', function(e) {
|
|
$(this).children('.input_radio').children('input[name="paiement-method"]').attr('checked', true);
|
|
});
|
|
|
|
// $('.submitPayment').live('click', function(e) {
|
|
// e.preventDefault();
|
|
// // check if selected
|
|
// $input = $('input[name="paiement-method"]:checked');
|
|
// if(!$input.length) {
|
|
// alert(paiementErrorMessage);
|
|
// }
|
|
// if ($input.val()) {
|
|
// // LOADER POUR PAYBOX
|
|
// if ($input.attr('data-module-name') == "paybox-direct"){
|
|
// $('.overlay_bbb').fadeIn();
|
|
// $('.box_paybox').fadeIn();
|
|
// }
|
|
// window.location = $input.val();
|
|
// } else {
|
|
// // LOADER POUR PAYPAL
|
|
// if ($input.attr('data-module-name') == "paypal") {
|
|
// $('.overlay_bbb').fadeIn();
|
|
// $('.box_paypal').fadeIn();
|
|
// }
|
|
// $form = $input.parent().children('div.hidden').children('form');
|
|
// $form.submit();
|
|
// }
|
|
// });
|
|
|
|
});
|
|
</script>
|
|
{/literal} |