Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

userAT

Новичок
  
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

563 profile views

userAT's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. согласен, только по пути который вы указали, ничего в нем не рилииет, я урезал url адреса по модулям, везгде все хорошо, а с этим меню удалось это сгделать только в кэше, пока как-то ик
  2. Всем привет, подскажите ггде конструкция которая отвечает за левое вертикальное меню, нужно в обещём что бы при клике на подкатегорию оно осивалось открытым, может кто силкивался с икой проблемой, оно на данный момент постоянно захлопывается.. <?php class ControllerExtensionModuleCategory extends Controller { public function index() { $this->load->language('extension/module/category'); $data['heading_title'] = $this->language->get('heading_title'); if (isset($this->request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { $parts = array(); } if (isset($parts[0])) { $data['category_id'] = $parts[0]; } else { $data['category_id'] = 0; } if (isset($parts[1])) { $data['child_id'] = $parts[1]; } else { $data['child_id'] = 0; } if (isset($parts[2])) { $data['child2_id'] = $parts[2]; } else { $data['child2_id'] = 0; } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $result_all_categories = $this->cache->get('octemplates.module_category.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id')); if (!$result_all_categories) { $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { $children_data = array(); $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { $children_data_level2 = array(); $children_level2 = $this->model_catalog_category->getCategories($child['category_id']); foreach ($children_level2 as $child_level2) { $data_level2 = array( 'filter_category_id' => $child_level2['category_id'], 'filter_sub_category' => true ); $children_data_level2[] = array( 'category_id' => $child_level2['category_id'], 'name' => $child_level2['name'], 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child_level2['category_id']), 'id' => $category['category_id']. '_' . $child['category_id']. '_' . $child_level2['category_id'] ); } $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'], 'children2' => $children_data_level2, 'href' => $this->url->link('product/category', 'path=' . $child['category_id']) ); } $result_all_categories[] = array( 'category_id' => $category['category_id'], 'name' => $category['name'], 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } $this->cache->set('octemplates.module_category.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id'), $result_all_categories); } $data['categories'] = $result_all_categories; return $this->load->view('extension/module/category', $data); } public function old_index() { $this->load->language('extension/module/category'); $data['heading_title'] = $this->language->get('heading_title'); if (isset($this->request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { $parts = array(); } if (isset($parts[0])) { $data['category_id'] = $parts[0]; } else { $data['category_id'] = 0; } if (isset($parts[1])) { $data['child_id'] = $parts[1]; } else { $data['child_id'] = 0; } // $data['opendop'] = 0; // if($data['parent'] != '0'){ // $opendop = $data['parent']; // $data['opendop'] = $opendop; // } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { $children_data = array(); if ($category['category_id'] == $data['category_id']) { $children = $this->model_catalog_category->getCategories($category['category_id']); foreach($children as $child) { $filter_data = array('filter_category_id' => $child['category_id'], 'filter_sub_category' => true); $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } } $filter_data = array( 'filter_category_id' => $category['category_id'], 'filter_sub_category' => true ); $data['categories'][] = array( 'category_id' => $category['category_id'], 'name' => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } return $this->load->view('extension/module/category', $data); } } этот файл я взял /www/happyhome.ru/system/storage/modification/catalog/controller/extension/module
  3. в обещём при обрезке url(a) пересило открываться левая менюшка, ^ ! згдесь по полному адресу она открыи как нужно, вопрос ггде модуль который за это отвечает..
  4. с икой же менюшкой намулился, в итоге сменил через кэшированый модуль, в оригинно не как((
  5. ну как бы вот ик, мы проводим рилиты по нему для сео, меня не касается откуда у заказликов шаблоны, просто все нужные модули менялись а с этим беда....столкнулся с opC...первый раз вот и пишу сюда
  6. зачем икие вопросы...? могли бы и не отвечать...я если бы знал, не задавал бы вопросов, спасипотому что
  7. да, сорян...но суть и что икой конструкции нет, с которой происходят изменения если гделать их в system/.. $children_data_level2[] = array( 'category_id' => $child_level2['category_id'], 'name' => $child_level2['name'], 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child_level2['category_id']), 'id' => $category['category_id']. '_' . $child['category_id']. '_' . $child_level2['category_id'] );
  8. <?php class ControllerExtensionModuleCategory extends Controller { public function index() { $this->load->language('extension/module/category'); $data['heading_title'] = $this->language->get('heading_title'); if (isset($this->request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { $parts = array(); } if (isset($parts[0])) { $data['category_id'] = $parts[0]; } else { $data['category_id'] = 0; } if (isset($parts[1])) { $data['child_id'] = $parts[1]; } else { $data['child_id'] = 0; } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { $children_data = array(); if ($category['category_id'] == $data['category_id']) { $children = $this->model_catalog_category->getCategories($category['category_id']); foreach($children as $child) { $filter_data = array('filter_category_id' => $child['category_id'], 'filter_sub_category' => true); $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $child['category_id']) ); } } $filter_data = array( 'filter_category_id' => $category['category_id'], 'filter_sub_category' => true ); $data['categories'][] = array( 'category_id' => $category['category_id'], 'name' => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } return $this->load->view('extension/module/category', $data); } } Это оригинал <?php class ControllerExtensionModuleCategory extends Controller { public function index() { $this->load->language('extension/module/category'); $data['heading_title'] = $this->language->get('heading_title'); if (isset($this->request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { $parts = array(); } if (isset($parts[0])) { $data['category_id'] = $parts[0]; } else { $data['category_id'] = 0; } if (isset($parts[1])) { $data['child_id'] = $parts[1]; } else { $data['child_id'] = 0; } if (isset($parts[2])) { $data['child2_id'] = $parts[2]; } else { $data['child2_id'] = 0; } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $result_all_categories = $this->cache->get('octemplates.module_category.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id')); if (!$result_all_categories) { $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { $children_data = array(); $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { $children_data_level2 = array(); $children_level2 = $this->model_catalog_category->getCategories($child['category_id']); foreach ($children_level2 as $child_level2) { $data_level2 = array( 'filter_category_id' => $child_level2['category_id'], 'filter_sub_category' => true ); $children_data_level2[] = array( 'category_id' => $child_level2['category_id'], 'name' => $child_level2['name'], 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child_level2['category_id']), 'id' => $category['category_id']. '_' . $child['category_id']. '_' . $child_level2['category_id'] ); } $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'], 'children2' => $children_data_level2, 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } $result_all_categories[] = array( 'category_id' => $category['category_id'], 'name' => $category['name'], 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } $this->cache->set('octemplates.module_category.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . $this->config->get('config_customer_group_id'), $result_all_categories); } $data['categories'] = $result_all_categories; return $this->load->view('extension/module/category', $data); } public function old_index() { $this->load->language('extension/module/category'); $data['heading_title'] = $this->language->get('heading_title'); if (isset($this->request->get['path'])) { $parts = explode('_', (string)$this->request->get['path']); } else { $parts = array(); } if (isset($parts[0])) { $data['category_id'] = $parts[0]; } else { $data['category_id'] = 0; } if (isset($parts[1])) { $data['child_id'] = $parts[1]; } else { $data['child_id'] = 0; } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { $children_data = array(); if ($category['category_id'] == $data['category_id']) { $children = $this->model_catalog_category->getCategories($category['category_id']); foreach($children as $child) { $filter_data = array('filter_category_id' => $child['category_id'], 'filter_sub_category' => true); $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'href' => $this->url->link('product/category' . $child['category_id']) ); } } $filter_data = array( 'filter_category_id' => $category['category_id'], 'filter_sub_category' => true ); $data['categories'][] = array( 'category_id' => $category['category_id'], 'name' => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } return $this->load->view('extension/module/category', $data); } } из system
  9. $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'], 'children2' => $children_data_level2, 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); в том то и гдело что икой структуры в оригинальном файле нет..
  10. Здравствуйте, спасипотому что за развернутый ответ, но в том то и гдело модификаторы я обновляю, как и лищю кэш по пути /www/happyhome.ru/system/storage/cache/
  11. Вопрос знатокам! после того как были перелопачены все контроллеры, он на конец-то нашёлся.. контроллер по пути /www/happyhome.ru/catalog/controller/extension/module/catalog.php (левое меню) что самое интересное не рилииет от этого адреса, хоть файл удали, но, зато спокойно себе функционирует и вносятся любые правки с /www/happyhome.ru/system/storage/modification/catalog/controller/extension/module/catalog.php в обещём вопрос однозначный, как это гдело исправить...? есть какие-то варианты Конструкция: /www/happyhome.ru/system/storage/modification/catalog/controller/extension/module/catalog.php $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'], 'children2' => $children_data_level2, 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); Конструкция: /www/happyhome.ru/catalog/controller/extension/module/catalog.php $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $child['category_id']) );
×
×
  • 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.