public function init() { $this->setBuyPopupTemplate('buy_popup_reserve.tpl.php'); $uid = $this->uid; $reserve_id = $this->reserve_id; $reqvs = ReservesHelper::getInstance()->getUserReqvs($uid); $form_type = $reqvs['form_type']; $rez_type = $reqvs['rez_type']; $form_id = $this->ID . '_form'; $rez_id = $this->ID . '_rez'; $form_name = $form_type == sbr::FT_PHYS ? 'физическое лицо' : 'юридическое лицо'; //$rez_name = $rez_type == sbr::RT_RU ? 'резидент РФ' : 'нерезидент РФ'; $rez_name = sbr::getRezTypeText($rez_type); $options = array('popup_title_class_bg' => 'b-fon_bg_po', 'popup_title_class_icon' => 'b-icon__po', 'popup_title' => 'Резервирование бюджета', 'popup_subtitle' => '', 'items_title' => 'Сумма оплаты', 'popup_id' => $this->ID, 'unic_name' => $this->UNIC_NAME, 'form_name' => $form_name, 'rez_name' => $rez_name, 'items' => array(array('value' => $reserve_id, 'name' => $form_id), array('value' => $reserve_id, 'name' => $rez_id)), 'payments_title' => 'Способ резервирования', 'payments_exclude' => $this->payments_exclude[$form_type]); if ($form_type == sbr::FT_JURI) { $options['items'][] = array('value' => 1, 'name' => 'is_reserve_send_docs'); } if ($this->reserveInstance->getReservePrice() >= self::MAX_PAYMEN_WM) { $options['payments_exclude'][] = self::PAYMENT_TYPE_WM; } if ($this->reserveInstance->getReservePrice() >= parent::MAX_PAYMENT_ALFA) { $options['payments_exclude'][] = self::PAYMENT_TYPE_ALFACLICK; } if ($this->reserveInstance->getReservePrice() >= parent::MAX_PAYMENT_SB) { $options['payments_exclude'][] = self::PAYMENT_TYPE_SBERBANK; } $options['payments_exclude'][] = self::PAYMENT_TYPE_PLATIPOTOM; parent::init($options); }
public function init() { global $js_file; $js_file['reserves_payout'] = 'reserves/reserves_payout.js'; $uid = get_uid(false); $reqvs = ReservesHelper::getInstance()->getUserReqvs($uid); $form_type = $reqvs['form_type']; $rez_type = $reqvs['rez_type']; $reqv = $reqvs[$form_type]; $payments = array(self::PAYMENT_TYPE_CARD => array('title' => 'Пластиковые<br/>карты', 'class' => 'b-button__pm_card', 'num' => @$reqv['el_ccard'], 'wait' => 'Идет выплата суммы.'), self::PAYMENT_TYPE_YA => array('title' => 'Яндекс.Деньги', 'class' => 'b-button__pm_yd', 'num' => @$reqv['el_yd'], 'wait' => 'Идет выплата суммы.'), self::PAYMENT_TYPE_BANK => array('title' => 'Банковский<br/>перевод', 'class' => 'b-button__pm_bank', 'num' => @$reqv['bank_rs'], 'wait' => 'Идет выплата суммы.'), self::PAYMENT_TYPE_RS => array('title' => 'Банковский<br/>перевод', 'class' => 'b-button__pm_bank', 'num' => @$reqv['bank_rs'], 'wait' => 'Идет выплата суммы.')); $form_list = array(sbr::FT_PHYS => 'физическое лицо', sbr::FT_JURI => 'юридическое лицо'); $this->options['form_txt'] = @$form_list[$form_type]; $this->options['rez_txt'] = sbr::getRezTypeText($rez_type); $allowed_payments = ReservesHelper::getInstance()->getAllowedPayoutTypes($form_type, $rez_type, $this->price); $this->options['payments'] = array_intersect_key($payments, $allowed_payments); $popup_id = self::getPopupId($this->options['idx']); $this->options['is_show'] = __paramInit('bool', $popup_id, $popup_id, false); }