openning save card to everyone

This commit is contained in:
Marion Muszynski 2016-10-11 11:48:25 +02:00
parent a93a5b14f2
commit 2a524a6262
2 changed files with 9 additions and 12 deletions

View File

@ -17,16 +17,14 @@
</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 && $isInGroupTest}
{if $paybox_cards}
<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,14 +256,14 @@ class Paybox extends PaymentModule
)
)
');
$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
');
// $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){
if ($isInGroupTest == 0){
if ($orders_with_delivery_address == 0){
$paybox_cards = array();
} else {
$paybox_cards = Db::getInstance()->executeS('
@ -283,8 +283,7 @@ class Paybox extends PaymentModule
'pbx_picture' => 'paybox',
'pbx_text' => $this->l('Pay by credit card with Paybox'),
'paybox_cards' => $paybox_cards,
'pbx_link_plus' => $pbx_link_plus,
'isInGroupTest' => (int)$isInGroupTest
'pbx_link_plus' => $pbx_link_plus
));
return ($this->display(__FILE__, 'hookpayment.tpl'));