Jump to content

lenadzhamalieva

Новичок
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Обычный

About lenadzhamalieva

  • Rank
    Пользователь

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. я не могу понять какой это модуль, переключаю на английский, та же картина, как понять какой это модуль?
  2. Друзья, может кто сталкивался, подскажите, почему в админке, на странице модули/расширения, в фильтре где вы мы выбираем тип расширения, появился неизвестный заголовок, heading_title (0), откуда он взялся? как его убрать?
  3. я не изменяла model/checkout/order.php там все по умолчанию, ничего не могу понять
  4. спасибо, сейчас попробую разобраться
  5. если бы я понимала что именно не так.. подскажите, будте добры
  6. помогите разобраться, при оформлении заказа появляется вот такое ругательство: SyntaxError: JSON Parse error: Unrecognized token '<' OK Notice: Undefined index: products in /var/www/u0522611/data/www/ххх/catalog/controller/extension/module/notificationTelegram.php on line 105Notice: Undefined index: products in /var/www/u0522611/data/www/ххх/catalog/controller/extension/module/notificationTelegram.php on line 105Notice: Undefined index: products in /var/www/u0522611/data/www/ххх/catalog/controller/extension/module/notificationTelegram.php on line 105{"redirect":"http://ххх/index.php?route=checkout/success"} код: <?php class ControllerExtensionModuleNotificationTelegram extends Controller { public function sendOrderAlert(&$route, &$data, &$output) { $order_id = $data[0]; $this->load->model('checkout/order'); $order_info = $this->model_checkout_order->getOrder($order_id); $this->load->model('setting/setting'); $setting = $this->model_setting_setting->getSetting('module_notificationTelegram'); if (isset($setting['module_notificationTelegram_order_alert'])) { $this->load->model('account/order'); if (count($this->model_account_order->getOrderHistories($order_id)) <= 1) { $message = $this->replaceMessage($setting['module_notificationTelegram_meassage'],$order_info); // $message .= $this->buldArray($order_info); $this->sendMessagetoTelegam($message); if (strpos(strtolower($setting['module_notificationTelegram_meassage']), '{products}') !== false) { $order_products = $this->model_checkout_order->getOrderProducts($order_id); $products = $this->bulidProducts($order_products); $this->sendMessagetoTelegam($products); } } } } public function sendAccountAlert(&$route, &$data, &$output) { $this->load->model('setting/setting'); $setting = $this->model_setting_setting->getSetting('module_notificationTelegram'); if (isset($setting['module_notificationTelegram_customer_alert'])) { $message = $this->replaceMessage($setting['module_notificationTelegram_new_account_meassage'],$data[0]); $this->sendMessagetoTelegam( $message); } } public function sendReturnProductAlert(&$data,&$output) { $this->load->model('setting/setting'); $setting = $this->model_setting_setting->getSetting('module_notificationTelegram'); if (isset($setting['module_notificationTelegram_return_alert'])) { $message = "Return request \n "; $this->sendMessagetoTelegam( $message); } } //Send message To notificationTelegram public function sendMessagetoTelegam($msg) { $this->load->model('setting/setting'); $setting = $this->model_setting_setting->getSetting('module_notificationTelegram'); //print_r($setting); $botToken = $setting['module_notificationTelegram_boot_token']; $website = "https://api.telegram.org/bot" . $botToken; $chatIds = $setting['module_notificationTelegram_chat_ids']; //Receiver Chat Id if (is_array($chatIds)) { foreach ($chatIds as $val) { $this->initMessage($botToken, $val, $msg); } } else { $this->initMessage($botToken, $chatIds, $msg); } } private function initMessage($botToken, $chatID, $msg) { $website = "https://api.telegram.org/bot" . $botToken; $params = [ 'chat_id' => $chatID, 'text' => $msg, ]; $ch = curl_init($website . '/sendMessage'); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, ($params)); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); } public function buldArray($arr) { if (is_array($arr)) { $dataAttributes = array_map(function ($value, $key) { return @"$key ---> $value \n"; }, array_values($arr), array_keys($arr)); return $dataAttributes = implode(' ', $dataAttributes); } } public function replaceMessage($string,$arr) { return $str = preg_replace_callback('/{(\w+)}/', function($match) use($arr) { return $arr[$match[1]]; }, $string ); } protected function bulidProducts($products){ $pr = array(); foreach ($products as $product){ $pr[] = "Name : $product[name] \n Price: $product[price] \n qty : $product[quantity] "; } return implode("------- \n",$pr); } }
  7. простите за тупость, не могли бы поподробнее, сбилась с ног..
  8. Друзья, опять вынуждена просить у вас совета, будьте добры, помогите разобрать ошибку вот такое ругательство не могу победить уже второй день: Fatal error: Uncaught Error: Call to undefined method ControllerPlazaBlogList::validateCopy() in /var/www/u0522611/data/www/ХХХ/admin/controller/plaza/blog/list.php:74 Stack trace: #0 /var/www/u0522611/data/storage3/modification/system/engine/action.php(79): ControllerPlazaBlogList->delete() #1 /var/www/u0522611/data/www/ХХХ/admin/controller/startup/router.php(26): Action->execute(Object(Registry), Array) #2 /var/www/u0522611/data/storage3/modification/system/engine/action.php(79): ControllerStartupRouter->index() #3 /var/www/u0522611/data/www/ХХХ/system/engine/router.php(67): Action->execute(Object(Registry)) #4 /var/www/u0522611/data/www/ХХХ/system/engine/router.php(56): Router->execute(Object(Action)) #5 /var/www/u0522611/data/www/ХХХ/system/framework.php(165): Router->dispatch(Object(Action), Object(Action)) #6 /var/www/u0522611/data/www/ХХХ/system/startup.php(104): require_once('/var/www/u05226...') #7 /var/www/u0522611/data/www/gel-t in /var/www/u0522611/data/www/ХХХ/admin/controller/plaza/blog/list.php on line 74 ВОТ КОД public function delete() { $this->load->language('plaza/blog/list'); $this->load->language('plaza/adminmenu'); $this->document->setTitle($this->language->get('page_title')); $this->load->model('plaza/blog'); if (isset($this->request->post['selected']) && $this->validateCopy()) { foreach ($this->request->post['selected'] as $post_list_id) { $this->model_plaza_blog->deletePostList($post_list_id); } $this->session->data['success'] = $this->language->get('text_success'); $url = ''; if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } $this->response->redirect($this->url->link('plaza/blog/list', 'user_token=' . $this->session->data['user_token'] . $url, true)); } $this->getList(); }
  9. вы можете мне помочь? я никак не могу разобраться самостоятельно
  10. Всем привет, помогите разобраться, весь день искала ответ, ничего не нашла, при попытке загрузить дополнительное фото в товаре возникает предупреждение: Notice: Undefined index: is_rotate in /var/www/u0522611/data/storage3/modification/admin/model/catalog/product.php on line 232 Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0522611/data/www/gel-travel.online/admin/controller/startup/error.php:34) in /var/www/u0522611/data/www/gel-travel.online/system/library/response.php on line 36 Заранее большое спасибо версия OpenCart 3.0.3.2 Кусок кода из файла product.php $this->db->query("DELETE FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'"); if (isset($data['product_image'])) { foreach ($data['product_image'] as $product_image) { if(isset($product_image['product_option_value_id']) && $product_image['product_option_value_id']) { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($product_image['image']) . "', sort_order = '" . (int)$product_image['sort_order'] . "', is_rotate = '" . (int)$product_image['is_rotate'] . "', product_option_value_id = '" . (int)$product_image['product_option_value_id'] . "'"); } else { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($product_image['image']) . "', sort_order = '" . (int)$product_image['sort_order'] . "', is_rotate = '" . (int)$product_image['is_rotate'] . "'"); } } }
×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.