diff --git a/modules/paybox/hookpayment.tpl b/modules/paybox/hookpayment.tpl index 704d74f3..0f9958ac 100755 --- a/modules/paybox/hookpayment.tpl +++ b/modules/paybox/hookpayment.tpl @@ -17,14 +17,16 @@
{$pbx_text} + {if $isInGroupTest} ? + {/if}
- {if $paybox_cards} + {if $paybox_cards && $isInGroupTest}

{l s='You have registered cards, you can use them to pay' mod='paybox'}

{foreach from=$paybox_cards item=account} diff --git a/modules/paybox/paybox.php b/modules/paybox/paybox.php index 0ca45f96..0476f5fc 100755 --- a/modules/paybox/paybox.php +++ b/modules/paybox/paybox.php @@ -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'));