Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

lenadzhamalieva

Newbie
  
  • Posts

    17
  • Joined

  • Last visited

Recent Profile Visitors

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

lenadzhamalieva's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Правила интеграции Switips summer 2020.pdf
  2. Здравствуйте, требуется помощь - подключить сайт к платформе Switips версия Opencart 3.0.3.2. жду в личку предложения по стоимости выполнения
  3. может подскажите где почитать подробнее, не очень понятно что делать
  4. Друзья, помогите понять что не так, хочу реализовать слайдер в шаблоне Opencart. На первом слайде контактная форма, на втором просто текст с кнопкой. Не понимаю в чем ошибка, может кто сталкивался, подскажите. Мои действия: добавила новый столбец в базу данных Имя: forms; Тип: int(11); По умолчанию: NULL. в admin/model/design/banner.php а) в функцию addBanner if (isset($data['banner_image'])) { foreach ($data['banner_image'] as $language_id => $value) { foreach ($value as $banner_image) { $this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($banner_image['title']) . "', link = '" . $this->db->escape($banner_image['link']) . "', forms = '" . $this->db->escape($banner_image['forms']) . "', image = '" . $this->db->escape($banner_image['image']) . "', sort_order = '" . (int)$banner_image['sort_order'] . "'"); } } } б) в функцию editBanner if (isset($data['banner_image'])) { foreach ($data['banner_image'] as $language_id => $value) { foreach ($value as $banner_image) { if (!array_key_exists('forms', $banner_image)) $banner_image['forms'] = 0; $this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($banner_image['title']) . "', link = '" . $this->db->escape($banner_image['link']) . "', forms = '" . $this->db->escape($banner_image['forms']) . "', image = '" . $this->db->escape($banner_image['image']) . "', sort_order = '" . (int)$banner_image['sort_order'] . "'"); } } } с) в функцию getBannerImages foreach ($banner_image_query->rows as $banner_image) { $banner_image_data[$banner_image['language_id']][] = array( 'title' => $banner_image['title'], 'link' => $banner_image['link'], 'forms' => $banner_image['forms'], 'image' => $banner_image['image'], 'sort_order' => $banner_image['sort_order'] ); } в /admin/controller/design/banner.php $data['banner_images'][$key][] = array( 'title' => $banner_image['title'], 'link' => $banner_image['link'], 'forms' => $banner_image['forms'], 'image' => $image, 'thumb' => $this->model_tool_image->resize($thumb, 100, 100), 'sort_order' => $banner_image['sort_order'] ); в admin/language/ru-ru/design/banner.php $_['entry_forms'] = 'Добавить форму закза'; в admin/view/template/design/banner_form.twig <td class="text-left" style="width: 30%;"> {% if forms %} <input type="checkbox" name="banner_image[{{ language.language_id }}][{{ image_row }}][forms]" value="1" checked="checked" /> {% else %} <input type="checkbox" name="banner_image[{{ language.language_id }}][{{ image_row }}][forms]" value="0" /> {% endif %} </td> При сохранении чекбокс не сохраняется, его значение не передается в базу данных, я новичок, очень нужна помощь.
  5. я не могу понять какой это модуль, переключаю на английский, та же картина, как понять какой это модуль?
  6. Друзья, может кто сталкивался, подскажите, почему в админке, на странице модули/расширения, в фильтре где вы мы выбираем тип расширения, появился неизвестный заголовок, heading_title (0), откуда он взялся? как его убрать?
  7. я не изменяла model/checkout/order.php там все по умолчанию, ничего не могу понять
  8. спасибо, сейчас попробую разобраться
  9. если бы я понимала что именно не так.. подскажите, будте добры
  10. помогите разобраться, при оформлении заказа появляется вот такое ругательство: 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); } }
  11. простите за тупость, не могли бы поподробнее, сбилась с ног..
  12. Друзья, опять вынуждена просить у вас совета, будьте добры, помогите разобрать ошибку вот такое ругательство не могу победить уже второй день: 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(); }
×
×
  • Create New...

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.