Merge branch 'ticket-payboxAgreement' into develop

This commit is contained in:
Marion Muszynski 2016-09-26 17:51:35 +02:00
commit 35700db205
2 changed files with 11 additions and 2 deletions

View File

@ -17,14 +17,16 @@
</div>
<div class="label">
<span class="title_payment">{$pbx_text}</span>
{if $isInGroupTest}
<span class="save_info">
<input type="checkbox" id="save_info_paybox" data-change="save_info_paybox">
<label for="save_info_paybox">{l s='Save my card information for future payments' mod='paybox'}</label><span class="paiement_info_lightbox paybox_info">?</span>
</span>
{/if}
</div>
</div>
{if $paybox_cards}
{if $paybox_cards && $isInGroupTest}
<div class="account_payment">
<p class="title">{l s='You have registered cards, you can use them to pay' mod='paybox'}</p>
{foreach from=$paybox_cards item=account}

View File

@ -256,7 +256,13 @@ class Paybox extends PaymentModule
)
)
');
if ($orders_with_delivery_address == 0){
$isInGroupTest = Db::getInstance()->getValue('
SELECT COUNT(cg.`id_group`)
FROM '._DB_PREFIX_.'customer_group cg
WHERE cg.`id_customer` = '.(int)$cart->id_customer.'
AND cg.`id_group` = 2
');
if ($isInGroupTest == 0 || $orders_with_delivery_address == 0){
$paybox_cards = array();
} else {
$paybox_cards = Db::getInstance()->executeS('
@ -277,6 +283,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,
));
return ($this->display(__FILE__, 'hookpayment.tpl'));