2016-01-04 12:48:08 +01:00
{ *
* 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' } ";
// ]]>
2016-10-19 16:23:01 +02:00
{ 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 {
$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 }
2016-01-04 12:48:08 +01:00
</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 }
2016-08-31 14:54:30 +02:00
{ 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 }
2016-01-04 12:48:08 +01:00
{ 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 }
2016-04-20 17:35:03 +02:00
<p class="cart_navigation">
<a href=" { $link - > getPageLink ( 'order.php' , true ) } ?step=2" title=" { l s = 'Previous' } " class="button"> { l s = 'Previous' } </a>
2016-10-19 16:23:01 +02:00
<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>
2016-04-20 17:35:03 +02:00
</p>
2016-01-04 12:48:08 +01:00
{ else }
</div>
{ /if }
2016-04-20 17:35:03 +02:00
2016-04-20 17:38:57 +02:00
<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>
2016-09-27 10:28:39 +02:00
<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>
2016-04-20 17:35:03 +02:00
2016-09-27 10:28:39 +02:00
<script>
2016-04-20 17:35:03 +02:00
var paiementErrorMessage = " { l s = 'You have to choose a paiement method' js = 1 } ";
</script>
{ literal }
<script>
$(document).ready(function() {
2016-09-27 10:28:39 +02:00
$('.payment_module .inner').live('click', function(e) {
2016-04-20 17:35:03 +02:00
$(this).children('.input_radio').children('input[name="paiement-method"]').attr('checked', true);
});
2016-09-27 10:28:39 +02:00
2016-10-19 16:23:01 +02:00
// $('.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();
// }
// });
2016-04-20 17:35:03 +02:00
});
</script>
{ /literal }