Огромное Вам спасибо за совет.
Но все равно не получилось разобраться...
Получается, я в файл system/smsgate/turbosms.php вставил код на сохранение в сессию:
$auth = $client->Auth($credentials);
$balance = $client->GetCreditBalance();
$this->session->data['smsbalance']=$balance->GetCreditBalanceResult;
А в файл catalog/model/checkout/order.php вставил код на получение из сессии:
// Send Admins SMS if configure
if ($this->config->get('config_sms_alert')) {
$options = array(
'to' => $this->config->get('config_sms_to'),
'copy' => $this->config->get('config_sms_copy'),
'from' => $this->config->get('config_sms_from'),
'username' => $this->config->get('config_sms_gate_username'),
'password' => $this->config->get('config_sms_gate_password'),
'message' => str_replace(array('{ID}', '{DATE}', '{TIME}', '{SUM}', '{PHONE}'),
array($order_id, date('d.m.Y'), date('H:i'), floatval($order_info['total']), $order_info['telephone']),
$this->config->get('config_sms_message'))
);
$registry = new Registry();
$registry->set('sms', new Sms($registry));
$sms = new Message($this->config->get('config_sms_gatename'), $options);
$sms->send();
$balance=$this->session->data['smsbalance'];
$this->log->write('Ваш баланс');
$this->log->write($balance);
}
Вот что мне после всего этого записало в лог:
2016-09-06 10:00:33 - PHP Notice: Indirect modification of overloaded property Turbosms::$session has no effect in D:\WEB_Server\OpenServer\domains\localhost\system\smsgate\turbosms.php on line 13
2016-09-06 10:00:34 - PHP Notice: Undefined index: smsbalance in D:\WEB_Server\OpenServer\domains\localhost\system\storage\modification\catalog\model\checkout\order.php on line 834
2016-09-06 10:00:34 - Ваш баланс
2016-09-06 10:00:34 -
Что не так я сделал? вроде все правильно вставил сессию. Прошу камнями не закидывать, я только учусь... Буду всем безмерно благодарен за помощь.