Всем привет! установил модуль infosmska (http://www.infosmska.ru/ ) для смс рассылок. Но почему-то при совершении заказа вот такая ошибка выдается Notice: Undefined offset: 1 in /system/library/oc_infosmska/gateway.php on line 56Notice: Undefined offset: 1 in /system/library/oc_infosmska/gateway.php on line 56 код gateway.php PHP: <?phpclass OCInfosmskaGateway { public function __construct($registry) { $this->db = $registry->get('db'); $this->config = $registry->get('config'); } public function get_order_info($textarea, $order_id, $order_status_id = 0) { $order = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` WHERE order_id = $order_id LIMIT 1"); $currency = $this->db->query("SELECT symbol_left,symbol_right FROM `" . DB_PREFIX . "currency` WHERE currency_id = " . $order->row['currency_id'] . " LIMIT 1"); $total = $currency->row['symbol_left'].number_format(round($order->row['total'] * $order->row['currency_value'], 2), 2).$currency->row['symbol_right']; $g_list = $status->row['name'] = ''; if (stripos($textarea, '{GOODS_LIST}') !== false) { $goods_list = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_product` WHERE order_id = $order_id"); foreach ($goods_list->rows as $k => $v) $g_list .= ($k ? "\n" : '').$v['name'].':'.$v['model'].':'.$v['quantity'].':'.$currency->row['symbol_left']. number_format(round($v['total'] * $order->row['currency_value'], 2), 2).$currency->row['symbol_right']; } if (stripos($textarea, '{ORDER_STATUS}') !== false) $status = $this->db->query("SELECT name FROM `" . DB_PREFIX . "order_status` WHERE order_status_id = " . ($order_status_id ? $order_status_id : $order->row['order_status_id']) . " AND language_id = ".$order->row['language_id'] . " LIMIT 1"); $macros = array('~\{ORDER_NUM\}~i', '~\{ORDER_SUM\}~i', '~\{ORDER_STATUS\}~i', '~\{FIRST_NAME\}~i', '~\{LAST_NAME\}~i', '~\{CR_PHONE\}~i', '~\{CR_ADDR\}~i', '~\{GOODS_LIST\}~i'); $value = str_replace('$', '\$', array($order_id, $total, $status->row['name'], $order->row['firstname'], $order->row['lastname'], $order->row['telephone'], $order->row['shipping_address_1'].($order->row['shipping_address_2'] ? ' '.$order->row['shipping_address_2'] : ''), $g_list)); return array('phone' => $order->row['telephone'], 'message' => preg_replace($macros, $value, $textarea), 'order_status_id' => $order->row['order_status_id']); } public function send($login, $password, $phone, $text, $sender) { $host = "api.infosmska.ru"; $fp = fsockopen($host, 80); fwrite($fp, "GET /interfaces/SendMessages.ashx" . "?login=" . rawurlencode($login) . "&pwd=" . rawurlencode($password) . "&phones=" . rawurlencode($phone) . "&message=" . rawurlencode($text) . "&sender=" . rawurlencode($sender) . " HTTP/1.1\r\nHost: $host\r\nConnection: Close\r\n\r\n"); fwrite($fp, "Host: " . $host . "\r\n"); fwrite($fp, "\n"); $response = ""; while(!feof($fp)) { $response .= fread($fp, 1); } fclose($fp); list($other, $responseBody) = explode("\r\n\r\n", $response, 2); list($other, $ids_str) = explode(":", $responseBody, 2); list($sms_id, $other) = explode(";", $ids_str, 2); return $sms_id; }} 56 строка: list($sms_id, $other) = explode(";", $ids_str, 2); Прошу помощи, саппорт инфосмски помочь не может ((
Как по мне модуль прост в установке, да цены для меня приемлемые. А преимущества перед Вашим модулем можете посмотреть на скринах и сравнить.
Ну тогда смотри по ценовой категории, если нет большой разницы. Я выбрал этот потому что для моего региона (Украина) цена самая низкая.