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

Форумчане помогите вывести меню 3 уровня в категориях


 Share

Recommended Posts

Я знаком базово но не силен помогите осушествит этот момент форумах искад везгде решение не нашель

 

Link to comment
Share on other sites


4 минуты назад, web312 сказал:

Я знаком базово но не силен помогите осушествит этот момент форумах искад везгде решение не нашель

 

Если не знаете как сгделать и 100500 тем ггде это разбирается не помогли- купите модуль меню с иким выводом и усиновите

Link to comment
Share on other sites


24 минуты назад, Dimasscus сказал:

Если не знаете как сгделать и 100500 тем ггде это разбирается не помогли- купите модуль меню с иким выводом и усиновите

К сожнонию модуль не подошло тема другая я искал модуль не нашел

Link to comment
Share on other sites


4 минуты назад, web312 сказал:

К сожнонию модуль не подошло тема другая я искал модуль не нашел

Тогда вам дорогав платные услуги

Link to comment
Share on other sites


1 час назад, web312 сказал:

Всем привет друзья нужен помощь надо сгделать 3уровень  меню открывающимскакак на фото помогите куча реещёний смотрелно они не поххожи 
ссылка на сайт http://demo.eweb12.beget.tech/
 

просто пример 
 

		foreach ($categories as $category) {
			if ($category['top']){
				$children_data = array();
				$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_child = array();
					$children_child = $this->model_catalog_category->getCategories($child['category_id']);
					  foreach ($children_child as $child_3) {
						$data_child_3 = array(
						  'filter_category_id'  => $child_3['category_id'],
						  'filter_sub_category' => true
						);

						$children_data_child[] = array(
						  'name'  => $child_3['name'],
						  'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child_3['category_id'])
						);
					  }
					  
					$children_data[] = array(
						'category_id' => $child['category_id'],
						'children' => $children_data_child,
						//'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
						'name' => $child['name'],
						'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'],
				'thumb' => $this->model_tool_image->resize(($category['image']=='' ? 'no_image.png' : $category['image']), 20, 28),
				'name'        => $category['name'],
				'children'    => $children_data,
				'href'        => $this->url->link('product/category', 'path=' . $category['category_id'])
			);	
			}
		}

 

Link to comment
Share on other sites

.nav-sidebar__section a:hover + .nav-sidebar__submenu, .nav-sidebar__section a + .nav-sidebar__submenu:hover {
    opacity: 1;
    pointer-events: inherit;
    -webkit-transform: none;
    transform: none;
}
.nav-sidebar__submenu {
    display: table;
}
@media (min-width: 1200px) {
.nav-sidebar__section .has-submenu:after {
    content: "";
    width: 10px;
    height: 10px;
    border-top: solid 1px #b3b6b7;
    border-right: solid 1px #b3b6b7;
    transition: all linear .2s;
    transform: translate(0, -50%) rotate(45deg);
    position: absolute;
    right: 2rem;
    top: 50%;
}
}

 

<nav id="menu" class="sidebar">
<ul class="nav-sidebar__list">
  <li class="nav-sidebar__section has-submenu">
    <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20"><img src="http://demo.eweb12.beget.tech/image/cache/catalog/demo/compaq_presario-25x25.jpg" alt="Компьютеры" title="Компьютеры">Компьютеры</a>
    <div class="nav-sidebar__submenu">
      <div class="submenu-title">
        <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20">Компьютеры</a>
      </div>
      <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20_26" class="has-submenu">PC (0)</a>
      <div class="nav-sidebar__submenu">
        <div class="submenu-title">
          <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20_26">PC</a>
        </div>
        <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20_26">11111111</a>
        <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20_27">22222222</a>
      </div>
      <a href="http://demo.eweb12.beget.tech/index.php?route=product/category&amp;path=20_27">Mac (1)</a>
    </div>
  </li>
</ul>
</nav>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.