вставил в двух местах http://joxi.ru/BA0OgNeSpjB4W2 доп условие что группа клиента не должны быть равна 2
Но все рапвно смс уходит.. может я не в том месте делаю правки или не в том файле
\catalog\model\checkout\order.php
Вот сам код который я думаю что отправляет смс
//SMS_Fly
if ($this->config->get('sfconfig_sms_alert_sf') || $this->config->get('sfconfig_sms_alert_user_sf')) {
$sfsuccess = (int)$this->config->get('sfconfig_sms_success_sf');
$sferror = (int)$this->config->get('sfconfig_sms_error_sf');
$sflogin = $this->config->get('sfconfig_sms_gate_username_sf');
$sfpass = $this->config->get('sfconfig_sms_gate_password_sf');
$sfai = $this->config->get('sfconfig_sms_from_sf');
require_once (DIR_SYSTEM . 'library/smsflyc.php');
$smsfly = new SmsFlyC($sflogin,$sfpass,$sfai);
}
if ($this->config->get('sfconfig_sms_alert_sf') && $order_statuses->row['COUNT(*)'] == 0 && $customer_info['customer_group_id'] != 2) {
$sfphonesmng = explode(',',$this->config->get('sfconfig_sms_to_sf'));
foreach ($sfphonesmng as $sfphonemng) {
$sfoptions = array(
'SMSFLY_PHONE' => $sfphonemng,
'SMSFLY_TEXT' => str_replace(array('{ID}', '{DATE}', '{TIME}', '{SUM}', '{PHONE}', '{NAME}', '{SONAME}' ),
array($order_id, date('d.m.Y'), date('H:i'), floatval($order_info['total']), $order_info['telephone'], $order_info['firstname'], $order_info['lastname'] ),
$this->config->get('sfconfig_sms_message_sf'))
);
$textreturn = $smsfly->sfSendSms($sfoptions);
if ($textreturn == "Сообщение отправлено.") {
$sfsuccess++;
$this->db->query("UPDATE " . DB_PREFIX . "setting SET `value` = '" . $sfsuccess . "' WHERE `key` = 'sfconfig_sms_success_sf'");
} else {
$sferror++;
$this->db->query("UPDATE " . DB_PREFIX . "setting SET `value` = '" . $sferror . "' WHERE `key` = 'sfconfig_sms_error_sf'");
}
}
}
if ($this->config->get('sfconfig_sms_alert_user_sf') && $order_statuses->row['COUNT(*)'] == 0 && $customer_info['customer_group_id'] != 2) {
$sfoptions = array(
'SMSFLY_PHONE' => $order_info['telephone'],
'SMSFLY_TEXT' => str_replace(array('{ID}', '{DATE}', '{TIME}', '{SUM}', '{PHONE}', '{NAME}', '{SONAME}' ),
array($order_id, date('d.m.Y'), date('H:i'), floatval($order_info['total']), $order_info['telephone'], $order_info['firstname'], $order_info['lastname'] ),
$this->config->get('sfconfig_sms_message_user_sf'))
);
$textreturn = $smsfly->sfSendSms($sfoptions);
if ($textreturn == "Сообщение отправлено.") {
$sfsuccess++;
$this->db->query("UPDATE " . DB_PREFIX . "setting SET `value` = '" . $sfsuccess . "' WHERE `key` = 'sfconfig_sms_success_sf'");
} else {
$sferror++;
$this->db->query("UPDATE " . DB_PREFIX . "setting SET `value` = '" . $sferror . "' WHERE `key` = 'sfconfig_sms_error_sf'");
}
}
//
Можете подсказать? @spectre