Перейти к содержанию
UTM.SPACE community

admin

Администраторы
  • Публикаций

    528
  • Зарегистрирован

  • Посещение

  • Победитель дней

    10

Сообщения, опубликованные admin

  1. В папке models создать файл agroprombank.class.php


    <?php
    /**
    * @author Darang
    * @date 10-Feb-2013
    * @copyright (c)2010-2013 JExt.biz
    */
    // no direct access
    defined ( '_JEXEC' ) or die ( 'Restricted access' );
    /**
    * exchange rates of Agroprombank
    */
    class currency_data_agroprombank extends currency_data {

    function __construct() {
    parent::__construct ();
    $this->url = "http://www.agroprombank.com/xmlinformer.php?type=official&date=";
    $this->bank_name = "Агропромбанк";
    $this->bank_url = "http://www.agroprombank.com";
    $this->currency_name = "";
    $this->date_format = 'Y-m-d';
    }

    function get_array($xml, $day = '', $replace_currency_array) {
    // Handle no data received error
    if (! isset ( $xml->document->course)) {
    $error ['error'] = 1;
    return $error;
    }

    // Save currencies' rates in an associative array indexed by currency 3 char code
    $rates = array (); // array to store currencies exchange rates
    $rates ['date'] = $xml->document->course[0]->attributes ( 'date' );
    $data = $xml->document->course[0]->currency;
    foreach ( $data as $dt ) {
    $code = $dt->attributes ( 'code' );
    // Store data for selected by user currencies only, if they are set
    if (empty ( $this->currencies ) || in_array ( $code, $this->currencies )) {
    //$rates ['currency'] [$code] ['numcode'] = $dt->ID [0]->data (); // num code
    $rates ['currency'] [$code] ['scale'] = 1; // units
    // Set currency name (array with replacement rules will be searched for the ISO code)
    $rates ['currency'] [$code] ['name'] = parent::replace_currency_name ( $code, $code, $replace_currency_array );
    $rates ['currency'] [$code] ['rate'] = $dt->data (); // exchange rate
    }
    }

    // Save additional info (only one time)
    if ($day == 'today' || $this->before_flag == FALSE) {
    $rates ['info'] = array ("bank_name" => $this->bank_name, "bank_url" => $this->bank_url, "currency_name" => $this->currency_name );
    }

    return $rates;
    }

    /**
    * Returns URL for receiving XML data file
    *
    * @param string Date
    * @return string URL
    */
    public function getUrl($date = "") {

    if (strlen ( $date ) > 1) {
    $url = $this->url . $date;
    } else {
    $url = $this->url.date($this->date_format,time());
    }
    //print_r($url);
    return $url;
    }
    }

    в mod_jextcurrency.xml в секцию source_class добавить


    <option value="agroprombank">Агропромбанк</option>

    • Like 1
  2. квитанция формируется самим билингом, поэтому должна редактироваться, видимо, где-то в шаблонах.

    Паспортные данные


    application / modules / billing / views / scripts / index / index.phtml

    del


    <tr>
    <td>Паспортные данные:</td>
    <td><?= $this->userData['passport']?></td>
    </tr>


  3. if ($this->view->identity == FALSE) {
    $this->_helper->flashMessenger->addMessage(
    array('error' => 'Вам необходимо авторизоваться')
    );
    $rs_uri='';
    if($_GET['rs_uri']) $rs_uri='&'.$_GET['rs_uri'];
    $this->_redirect('/?return_uri=' . $this->view->url().$rs_uri);
    }

    в файле /application/modules/billing/controllers/IndexController.php в функции init()

  4. в css файле можно прописать


    .jextcurrency {
    font-family: Helvetica,Arial, Sans-Serif;
    font-size: 12px;
    }

    в зависимости от ваших потребностей, можете к каким то конкретным элементам

    .jextcurrency a{}

    модуль выводит данные по порядку, как они передаются от источника

    • Like 1
  5. /application/modules/billing/views/scripts/index/payment.phtml

    замените


    $userPeyment['payment_method'])

    на

    str_replace('Cash payment','Оплата наличными',$userPeyment['payment_method']);

    Можно также в /library/Urfa/Client.php в функции get_payments_report

    добавить


    $tmp['payment_method'] = $this->urfa->get_string();
    $tmp['payment_method'] = str_replace('Cash payment','Оплата наличными',$tmp['payment_method']);

  6. Уведомление пользователей через sms
    post-1-0-15552400-1342786582_thumb.gif

    Настройки
    ;текст уведомления

    sms.balancetext = "Ваш баланс для лицевого счёта {account} составляет {balance} руб.";

    ;текст при балансе меньше 0
    sms.balancetext_otr = "Задолженность для лицевого счёта {account} составляет {balance} руб.";

    ;кол-во sms за один вызов скрипта
    sms.balance_count = 100

    ;кол-во часов между уведомлениями о балансе для одного пользователя
    sms.balance_interval = 72

    ;баланс ниже которого будут отправляться sms
    sms.balance = 20

    ;баланс ниже которого уже не будут отправляться сообщения
    sms.balance_min = -1000


    SCMS
    https://yadi.sk/d/rPe2VGm83Mvgi8

    smsUslugi
    https://yadi.sk/d/7e_kjsvtfpewR

×
×
  • Создать...