bebeboutik/themes/site/order-payment.tpl

212 lines
6.7 KiB
Smarty
Raw Normal View History

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'}";
2017-06-22 16:53:29 +02:00
var payment_click = 0;
2016-01-04 12:48:08 +01:00
// ]]>
2016-09-21 14:29:34 +02:00
{literal}
// Function to submit payment and send the information to GA
2017-06-22 16:53:29 +02:00
function submitPayment(payment_click){
$input = $('input[name="paiement-method"]:checked');
if(!$input.length) {
alert(paiementErrorMessage);
}
2017-06-22 16:53:29 +02:00
$('.overlay_bbb').click(function(e){
if(payment_click != 0) {
// prevent multi click
2016-09-21 17:06:43 +02:00
$('.overlay_bbb').fadeIn();
2017-06-22 16:53:29 +02:00
if ($input.val()) {
if ($input.attr('data-module-name') == "paybox-direct"){
$('.box_paybox').fadeIn();
}
if ($input.attr('data-module-name') == "paypal") {
$('.box_paypal').fadeIn();
}
}
return false;
2016-09-21 17:06:43 +02:00
}
2017-06-22 16:53:29 +02:00
});
if(payment_click == 0) {
2017-07-11 10:04:00 +02:00
//payment_click = payment_click+1;
2017-06-22 16:53:29 +02:00
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();
}
2016-10-07 15:11:25 +02:00
} else {
2017-07-11 10:04:00 +02:00
if($input.attr('data-module-name') == "paybox"){
if(!$('input#save_info_paybox:checked').length){
$form = $input.parent().children('div.hidden').children('form#paybox_form');
} else {
$form = $input.parent().children('div.hidden').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';
}
2017-06-22 16:53:29 +02:00
}
if (window.ga && ga.create){
// submit form by GA send event
onStepComplete(4, $name,null,$form);
} else {
$form.submit();
}
2016-10-07 15:11:25 +02:00
}
} else {
2017-06-22 16:53:29 +02:00
$('.overlay_bbb').fadeIn();
return false;
}
}
2016-09-21 14:29:34 +02:00
{/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'}
{include file="$tpl_dir./order-steps.tpl"}
<h1>{l s='Choose your payment method'}</h1>
{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:56:59 +02:00
{if !$opc}<p>{l s='Please select your preferred payment method to pay the amount of'}&nbsp;<span class="price">{convertPrice price=$total_price}</span> {if $taxes_enabled}{l s='(tax incl.)'}{/if} {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-03-07 13:01:56 +01:00
{if $cookie->id_lang == 3}
<p>
Si tienes cualquier duda o problema, puedes contactar con el Servicio de atención al cliente (<a href="http://www.bebeboutik.es/contactenos">http://www.bebeboutik.es/contactenos</a>) y escribirnos un mensaje o bien llamar al 902 044 399 y uno de nuestros agentes te atenderá.
</p>
{/if}
2016-04-06 15:52:14 +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>
2017-07-11 10:04:00 +02:00
<a class="exclusive submitPayment" title="{l s='Valider ma commande'}" class="button" onclick="submitPayment(payment_click); payment_click++; return ((window.ga && ga.create)? !ga.loaded : true);">{l s='Valider ma commande'}</a>
2016-04-06 15:52:14 +02:00
</p>
2016-01-04 12:48:08 +01:00
{else}
</div>
{/if}
2016-04-06 15:52:14 +02:00
2016-04-20 14:20:07 +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-21 16:40:26 +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 14:20:07 +02:00
2016-09-21 16:21:32 +02:00
<script>
2016-04-06 15:52:14 +02:00
var paiementErrorMessage = "{l s='You have to choose a paiement method' js=1}";
</script>
{literal}
<script>
$(document).ready(function() {
2016-09-21 16:21:32 +02:00
$('.payment_module .inner').live('click', function(e) {
2016-04-06 15:52:14 +02:00
$(this).children('.input_radio').children('input[name="paiement-method"]').attr('checked', true);
});
2016-09-21 16:21:32 +02:00
2017-06-22 16:53:29 +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()) {
// 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-06 15:52:14 +02:00
// });
2016-04-06 15:52:14 +02:00
});
</script>
{/literal}