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

userAT

Newbie
  
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

789 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.