prepare tests prod

This commit is contained in:
Marion Muszynski 2016-09-27 10:28:39 +02:00
parent 0c5950b71d
commit 6f89c44d2c
4 changed files with 30 additions and 7 deletions

View File

@ -36,7 +36,7 @@
<input type="hidden" name="id_paybox_card" value="{$account.id_paybox_card}"/>
</form>
</div>
<input data-module-name="paybox" type="radio" value="{$base_dir_ssl}modules/paybox/direct_paiement.php?id_paybox_card={$account.id_paybox_card}" name="paiement-method" id="paybox_{$account.id_paybox_card}">
<input data-module-name="paybox-direct" type="radio" value="{$base_dir_ssl}modules/paybox/direct_paiement.php?id_paybox_card={$account.id_paybox_card}" name="paiement-method" id="paybox_{$account.id_paybox_card}">
<label for="paybox_{$account.id_paybox_card}">{$account.payment_type} {$account.value} - {$account.date_validity}</label>
</div>
{/foreach}

View File

@ -262,7 +262,8 @@ class Paybox extends PaymentModule
WHERE cg.`id_customer` = '.(int)$cart->id_customer.'
AND cg.`id_group` = 2
');
if ($isInGroupTest == 0 || $orders_with_delivery_address == 0){
//if ($isInGroupTest == 0 || $orders_with_delivery_address == 0){
if ($isInGroupTest == 0){
$paybox_cards = array();
} else {
$paybox_cards = Db::getInstance()->executeS('
@ -283,7 +284,7 @@ class Paybox extends PaymentModule
'pbx_text' => $this->l('Pay by credit card with Paybox'),
'paybox_cards' => $paybox_cards,
'pbx_link_plus' => $pbx_link_plus,
'isInGroupTest' => (int)$isInGroupTest,
'isInGroupTest' => (int)$isInGroupTest
));
return ($this->display(__FILE__, 'hookpayment.tpl'));

View File

@ -124,6 +124,11 @@
}
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

View File

@ -87,17 +87,29 @@
</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>
<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) {
$('.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
@ -107,6 +119,11 @@
}
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
@ -114,7 +131,7 @@
$('.overlay_bbb').fadeIn();
$('.box_paypal').fadeIn();
}
$form = $input.parent().children('div.hidden').children('form');
$form = $input.parent().children('div.hidden').children('form');
$form.submit();
}