Jump to content
Sign in to follow this  
Faha

Табы категорий,какой класс?

Recommended Posts

Здравствуйте уважаемые форумчани :)

Продолжаю адаптировать  шаблон под opencart,и вновь появились проблемы...

 

 

Это шапка она всегда видна

e4e3c1177d0dcc243ba910efdf8b9bdf.png

Не могу понять какой класс нужно редактировать,что бы при переходи на категорию, или товар категории менялся класс этой категории(активный вид),в module/category.tpl это class active, в tabs.js это selected, я создал оба класса но эффекта нет,может есть еще какие либо файлы которые используются в категориях?\

header.tpl

<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php echo $google_analytics; ?>
</head>

Category.tpl

<div class="menu-sections">
<div class="clr"></div>
	<div id="menu">
        <?php foreach ($categories as $category) { ?>
          <?php if ($category['children']) { ?>
          <ul class="submenu">
            <?php foreach ($category['children'] as $child) { ?>
            <li>
              <?php if ($child['category_id'] == $child_id) { ?>
              <a href="<?php echo $child['href']; ?>" class="active" id="tf"><?php echo $child['name']; ?></a>
              <?php } else { ?>
              <a href="<?php echo $child['href']; ?>" id="tf"><?php echo $child['name']; ?></a>
              <?php } ?>
            </li>
            <?php } ?>

          </ul>
          <!-- <a class="jojo" href="#"><span>Новые</span></a> -->
          <?php } ?>
        <?php } ?>
        </div>
      <div class="clr"></div>
</div>


Share this post


Link to post
Share on other sites

Класс оказался .active,но он работает только когда выключен seo url,а как при включенном то сделать?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By svmax
      Наш стек: (OPENCART 1.5), Memcached, MуSQL. Интернет-магазин интегрирован с 1С и облачной CRM, платежной системой.
      часть внутреннего функционала написано JavaScript фреймворке Vue.js 
      Требования к кандидату:
      - Знание php mysql html css javascrip
      - Знание архитектуры MVC
      - Опыт работы с опенкарт ocStore Версия 1.5.5.1.2
      - Умение работать с системой контроля версий Git (github.com)
      Оплата 500р в час. 
      Задачи составляются в подробное ТЗ, выполнение контролируется тимлидом. 
      Работа не разовая, задачи на доработки появляются регулярно.
      примерная загрузка 50-100 часов в месяц.
      Обязанности:
      Развитие интернет-магазина,
      Интеграции с внешними сервисами,
      Правка или доработка шаблона,
      Работы по ускорению магазина,
      Написание нового функционала и расширение функций движка.
      Дописывания новой бизнес логики.

      - Текущие задачи требующие выполнения.
      * Доработать внутренний скрипт управления товарами (php).
      * Исправить ошибки php кода из журнала логирования ошибок
      * Перевести движок сайта с php 5.6 => php 7.3
      * Настроить кеширование запросов к базе данных на тяжелых страницах
      * Поработать со скоростью загрузки страниц сайта.
       
      При откликах желательно прикреплять портфолио и описание о себе.
    • By amd1981
      Всех приветствую!
      Появилась необходимость скрытия меню от индексации Яндексом на всех страницах категорий, кроме главной страницы. Есть вариант, как это сделать на php (архив прикрепил). Не очень понятно как это реализовать на menu.twig или через контроллер menu.php (вроде как выводить java через menu.twig не очень то и правильно). Можете подсказать, как это реализовать?
       
      menu.twig
      {% if (not modern_header_var) %} <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 menu_adapt"> <div class="top-menu"> <div id="top-menu" > <div class="nobackground"> <nav id="menu" class="navbar"> <div class="navbar-header"><span id="category" class="visible-xs">{{ text_category }}</span> <button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> </div> <div class="collapse navbar-collapse navbar-ex1-collapse menu_adapt_coll"> <noindex><ul class="nav navbar-nav"> {% if (modern_ico_home != 1 and home != og_url) %} <li><a href="{{ base }}"><i class="fa fa-home fa_homemenu"></i></a></li> {% endif %} {% if (modern_ico_home_text != 1 and home != og_url) %} <li><a href="{{ base }}">{{ text_homel }}</i></a></li> {% endif %} {% if (modern_seevmenu_menu != 1) %} {% if (not modern_open_menu and home == og_url) %} <li class="dropdown hidev open"> {% else %} <li class="dropdown hidev"> {% endif %} <a class="with-child dropdown-toggle size" {% if (modern_link_menucatalog is not empty) %} href="{{ modern_link_menucatalog }}" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false"> {% if (modern_seevmenuico != 1) %} <i class="fa fa-bars"></i>&nbsp;&nbsp; {% endif %} {{ modern_vmenu_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <ul class="dropdown-menu multi-level" role="menu"> {% for category in categories %} {% if (category['children']) %} <li class="dropdown-submenu li-drop close-button" > <a class="dr_menu" tabindex="-1" href="{{ category['href'] }}">{{ category['name'] }}<span class="arrowvertmenu"></span></a> <ul class="dropdown-menu2 column_width3"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <li class="col-lg-3 col-md-3 col-sm-4 li-main-foto"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li> {% endif %} {% for child in category['children'] %} <li class="col-sm-4 mcol"> <span class = "hidden-xs">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="vopmen img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <div class="clearfix"></div> <a class="submenu_main" href="{{ child['href'] }}">{{ child['name'] }}</a> {% if (modern_3lv_menu != 1) %} {% if (child['children_lv3'] is defined and child['children_lv3']) %} {% set v = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <a class = "menuv_3lv " href="{{ child_lv3['href'] }}">&nbsp;&nbsp;- {{ child_lv3['name'] }}</a> {% set v = v + 1 %} {% if (v >modern_countvmenulv - 1) %} <a class="menuv-allv" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} {% endfor %} {% endif %} {% endif %} </li> {% endfor %} </ul> </li> {% else %} <li class="v3hover li-drop close-button"><a class="dr_menu" href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} <li id="openclose"> <p class="dr_menu menu_slow">{{ text_modern_menu_open }}</p> </li> </ul> </li> {% endif %} </ul></noindex> <noindex><div class="menu_mob_plus"> <div class="hidem"> <ul class="nav navbar-nav"> {% for category in categories %} {% if (category['children']) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %} dropdown static_pos"> <a class="with-child dropdown-toggle" href="{{ category['href'] }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ category['name'] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu marg_top"> <div class="dropdown-inner children-category"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <ul class="col-lg-2 col-md-3 col-sm-3 li-main-foto"><li class="list_type"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="image_main main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li></ul> {% endif %} {% for child in category['children'] %} <ul class="list-unstyled {% if (category['image_main'] and modern_main_photos_menu != 1) %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_img {% else %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_noimg {% endif %}" > {% if (child['children_lv3'] is defined and child['children_lv3']) %} <li class="with-child" > <span class = "hidden-xs hidden-sm">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a> </li> {% if (modern_3lv_menu != 1) %} {% set m = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <li class="children_lv3"><a href="{{ child_lv3['href'] }}">&nbsp;&nbsp;- {{ child_lv3['name'] }}</a> {% set m = m + 1 %} {% if (m >modern_countvmenulv - 1) %} <a class="menuv-all" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} </li> {% endfor %} {% endif %} {% else %} <li>{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<span class = "hidden-xs hidden-sm"><a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a></span>{% endif %}<a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a></li> {% endif %} </ul> {% endfor %} </div> </div> <div class="clearfix"></div> </li> {% else %} <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %}"><a href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} </ul> </div> <ul class="nav navbar-nav"> <!--add menu link--> {% if (modern_top_links8 ) %} {% for modern_top_link8 in modern_top_links8 %} <li> <a {% if (modern_top_link8['link_top'][language_id]) %} href="{{ modern_top_link8['link_top'][language_id] }}"{% endif %}>{% if (modern_top_link8['faicons_top']) %} <i class="{{ modern_top_link8['faicons_top'] }}"></i> {% endif %}{% if (modern_top_link8['title']) %}{{ modern_top_link8['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} <!--add menu link--> <!--other link--> {% if (modern_main_link_menu[language_id]) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" {% if (modern_main_link_href_menu[language_id] is not empty) %} href="{{ modern_main_link_href_menu[language_id] }}" {% else %} href="javascript:void(0)" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false">{{ modern_main_link_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% if (modern_top_links4 ) %} {% for modern_top_link4 in modern_top_links4 %} <li> <a {% if (modern_top_link4['link_top'][language_id]) %} href="{{ modern_top_link4['link_top'][language_id] }}"{% endif %} title="{{ modern_top_link4['title'][language_id] }}">{% if (modern_top_link4['faicons_top']) %} <i class="{{ modern_top_link4['faicons_top'] }}"></i>{% endif %}{% if (modern_top_link4['title']) %} {{ modern_top_link4['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} </ul> </div> </div> </li> {% endif %} <!--other link END--> <!--informations--> {% if (modern_info_menu != 1) %} {% if (informations) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_information }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% for information in informations %} <li><a href="{{ information['href'] }}">{{ information['title'] }}</a></li> {% endfor %} </ul> </div> </div> </li> {% endif %} {% endif %} <!--informations END--> <!--manufacturer--> {% if (modern_man_menu != 1) %} {% if (manufacturers) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown postion_fullmenu2"> <a class="with-child dropdown-toggle" href="{{ href_manufacturer }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_manufacturer }}<span class="fa fa-angle-down menu"></span></a> <div class="mancss dropdown-menu"> <div class="dropdown-inner children-category"> {% for manufacturer in manufacturers %} <ul class="list-unstyled" style="width: {{ 100/modern_menuman_column-1 }}%"> <li>{% if (modern_photos_menu_manuf != 1) %}<span class = "hidden-xs hidden-sm "><a class = "manufac-menu" href="{{ manufacturer['href'] }}"><img class="opacityhv manimgmen" src="{{ manufacturer['manufacturer_image'] }}" alt="{{ manufacturer['name'] }}" title="{{ manufacturer['name'] }}" ></a></span>{% endif %}<a class = "manufac-menu" href="{{ manufacturer['href'] }}">{{ manufacturer['name'] }}</a></li> </ul> {% endfor %} </div> </div> </li> {% endif %} {% endif %} <!--manufacturer END--> </ul> </div></noindex> </div> </nav> </div> </div> </div> </div> </div> <script> categories_count = {{ categories|length }}; modern_menu_category_lg = {{ modern_menu_category_lg }}; modern_menu_category_md = {{ modern_menu_category_md }}; modern_menu_category_sm = {{ modern_menu_category_sm }}; var q = 0; $(window).scroll(function(){if(window.innerWidth>991)if($(window).scrollTop()>{% if (not modern_open_menu) %}850{% else %}250{% endif %}){if(0==q){var a='<div class="top-header2"><div id="fix_scroll"><div class="container"><div class="row postion_fullmenu"><div id="logo" class="col-lg-1 col-md-1 col-sm-1 col-xs-1">';a+=$("div#logo").html(),a+='</div><div class="col-lg-9 col-md-9 col-sm-9 col-xs-9 postion_fullmenu2"><div class="top-menu">',a+=$("div.top-menu").html(),a+='</div></div><div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 cart">',a+=$("div.cart").html(),a+="</div></div></div></div></div>",$("body").append(a),$(".top-header2 .hidev").removeClass("open"),$(".top-header2 .hidev").addClass("slide"),q=1}}else 1==q&&($("*").remove(".top-header2"),q=0)}); $(window).resize(function() { if (window.innerWidth < 992) { $('*').remove('.top-header2'); } else if (window.innerWidth > 991 && window.innerWidth < 1200) { $('.dropdown-menu2').attr('class', 'dropdown-menu2 column_width2'); $('.mcol').attr('class', 'col-sm-4 mcol'); $('.dropdown-menu2 .clearfix').remove(); $(".dropdown-menu2 > li:nth-child(3n)").after('<li class="clearfix visible-sm visible-md visible-lg"></li>'); category_menu = {{ category_menu_sm }}; if (modern_menu_category_sm < categories_count) { $('#openclose').css('display', ''); } else { $('#openclose').css('display', 'none'); } } else if (window.innerWidth > 1199 && window.innerWidth < 1600) { $('.dropdown-menu2').attr('class', 'dropdown-menu2 column_width3'); $('.mcol').attr('class', 'col-sm-3 mcol'); $('.dropdown-menu2 .clearfix').remove(); $(".dropdown-menu2 > li:nth-child(4n)").after('<li class="clearfix visible-sm visible-md visible-lg"></li>'); category_menu = {{ category_menu_md }}; if (modern_menu_category_md < categories_count) { $('#openclose').css('display', ''); } else { $('#openclose').css('display', 'none'); } } else if (window.innerWidth > 1599) { $('.dropdown-menu2').attr('class', 'dropdown-menu2 column_width3'); $('.mcol').attr('class', 'col-sm-3 mcol'); $('.dropdown-menu2 .clearfix').remove(); $(".dropdown-menu2 > li:nth-child(4n)").after('<li class="clearfix visible-sm visible-md visible-lg"></li>'); category_menu = {{ category_menu_lg }}; if (modern_menu_category_lg < categories_count) { $('#openclose').css('display', ''); } else { $('#openclose').css('display', 'none'); } } }); $(window).resize(); $(".menu_slow").click(function () { if ($(".dropdown-menu > li.li-drop:nth-last-child(-n+"+ category_menu +")").is(":hidden")) { $(".dropdown-menu > li.li-drop:nth-last-child(-n+"+ category_menu +")").show("slow"); $('.li-drop').removeClass('close-button'); $('.li-drop').addClass('open-button'); $('.menu_slow').text('{{ text_modern_menu_close }}'); } else { $(".dropdown-menu > li.li-drop:nth-last-child(-n+"+ category_menu +")").hide("slow"); $('.li-drop').removeClass('open-button'); $('.li-drop').addClass('close-button'); $('.menu_slow').text('{{ text_modern_menu_open }}'); } return false; }); </script> {% else %} <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 postion_fullmenu2"> <div class="top-menu"> <div id="top-menu" > <div class="nobackground"> <nav id="menu" class="navbar"> <div class="navbar-header"><span id="category" class="visible-xs">{{ text_category }}</span> <button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> </div> <div class="collapse navbar-collapse navbar-ex1-collapse menu_adapt_coll"> <ul class="nav navbar-nav"> {% if (modern_ico_home != 1) %} <li><a href="{{ base }}"><i class="fa fa-home fa_homemenu"></i></a></li> {% endif %} {% if (modern_ico_home_text != 1) %} <li><a href="{{ base }}">{{ text_homel }}</i></a></li> {% endif %} {% if (modern_seevmenu_menu != 1) %} <li class="dropdown hidev"> <a class="with-child dropdown-toggle size" {% if (modern_link_menucatalog is not empty) %} href="{{ modern_link_menucatalog }}" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false"> {% if (modern_seevmenuico != 1) %} <i class="fa fa-bars"></i>&nbsp;&nbsp; {% endif %} {{ modern_vmenu_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <ul class="dropdown-menu multi-level" role="menu"> {% for category in categories %} {% if (category['children']) %} <li class="dropdown-submenu li-drop" > <a class="dr_menu" tabindex="-1" href="{{ category['href'] }}"> {{ category['name'] }} <span class="arrowvertmenu"></span></a> <ul class="dropdown-menu2"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <li class="col-lg-3 col-md-3 col-sm-4 li-main-foto"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li> {% endif %} {% for child in category['children'] %} <li class="col-sm-4 mcol"> <span class = "hidden-xs">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="vopmen img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <div class="clearfix"></div> <a class="submenu_main" href="{{ child['href'] }}">{{ child['name'] }}</a> {% if (modern_3lv_menu != 1) %} {% if (child['children_lv3'] is defined and child['children_lv3']) %} {% set v = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <a class = "menuv_3lv " href="{{ child_lv3['href'] }}">&nbsp;&nbsp;- {{ child_lv3['name'] }}</a> {% set v = v + 1 %} {% if (v >modern_countvmenulv - 1) %} <a class="menuv-allv" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} {% endfor %} {% endif %} {% endif %} </li> {% endfor %} </ul> </li> {% else %} <li class="v3hover li-drop"><a class="dr_menu" href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} </ul> </li> {% endif %} </ul> <div class="menu_mob_plus"> <div class="hidem"> <ul class="nav navbar-nav"> {% for category in categories %} {% if (category['children']) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %} dropdown postion_fullmenu2"> <a class="with-child dropdown-toggle" href="{{ category['href'] }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ category['name'] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner children-category"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <ul class="col-lg-2 col-md-3 col-sm-3 li-main-foto"><li class="list_type"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="image_main main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li></ul> {% endif %} {% for child in category['children'] %} <ul class="list-unstyled {% if (category['image_main'] and modern_main_photos_menu != 1) %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_img {% else %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_noimg {% endif %}" > {% if (child['children_lv3'] is defined and child['children_lv3']) %} <li class="with-child" > <span class = "hidden-xs hidden-sm">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a> </li> {% if (modern_3lv_menu != 1) %} {% set m = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <li class="children_lv3"><a href="{{ child_lv3['href'] }}">&nbsp;&nbsp;- {{ child_lv3['name'] }}</a> {% set m = m + 1 %} {% if (m >modern_countvmenulv - 1) %} <a class="menuv-all" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} </li> {% endfor %} {% endif %} {% else %} <li>{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<span class = "hidden-xs hidden-sm"><a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a></span>{% endif %}<a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a></li> {% endif %} </ul> {% endfor %} </div> </div> <div class="clearfix"></div> </li> {% else %} <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %}"><a href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} </ul> </div> <ul class="nav navbar-nav"> <!--add menu link--> {% if (modern_top_links8 ) %} {% for modern_top_link8 in modern_top_links8 %} <li> <a {% if (modern_top_link8['link_top'][language_id]) %} href="{{ modern_top_link8['link_top'][language_id] }}"{% endif %}>{% if (modern_top_link8['faicons_top']) %} <i class="{{ modern_top_link8['faicons_top'] }}"></i> {% endif %}{% if (modern_top_link8['title']) %}{{ modern_top_link8['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} <!--add menu link--> <!--other link--> {% if (modern_main_link_menu[language_id]) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" {% if (modern_main_link_href_menu[language_id] is not empty) %} href="{{ modern_main_link_href_menu[language_id] }}" {% else %} href="javascript:void(0)" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false">{{ modern_main_link_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% if (modern_top_links4 ) %} {% for modern_top_link4 in modern_top_links4 %} <li> <a {% if (modern_top_link4['link_top'][language_id]) %} href="{{ modern_top_link4['link_top'][language_id] }}"{% endif %} title="{{ modern_top_link4['title'][language_id] }}">{% if (modern_top_link4['faicons_top']) %} <i class="{{ modern_top_link4['faicons_top'] }}"></i>{% endif %}{% if (modern_top_link4['title']) %} {{ modern_top_link4['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} </ul> </div> </div> </li> {% endif %} <!--other link END--> <!--informations--> {% if (modern_info_menu != 1) %} {% if (informations) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_information }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% for information in informations %} <li><a href="{{ information['href'] }}">{{ information['title'] }}</a></li> {% endfor %} </ul> </div> </div> </li> {% endif %} {% endif %} <!--informations END--> <!--manufacturer--> {% if (modern_man_menu != 1) %} {% if (manufacturers) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown manuf_drop postion_fullmenu2"> <a class="with-child dropdown-toggle" href="{{ href_manufacturer }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_manufacturer }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner children-category"> {% for manufacturer in manufacturers %} <ul class="list-unstyled" style="width: {{ 100/modern_menuman_column-1 }}%"> <li><span class = "hidden-xs hidden-sm ">{% if (modern_photos_menu_manuf != 1) %}<a class = "manufac-menu" href="{{ manufacturer['href'] }}"><img class="opacityhv manimgmen" src="{{ manufacturer['manufacturer_image'] }}" alt="{{ manufacturer['name'] }}" title="{{ manufacturer['name'] }}" ></a></span>{% endif %}<a class = "manufac-menu" href="{{ manufacturer['href'] }}">{{ manufacturer['name'] }}</a></li> </ul> {% endfor %} </div> </div> </li> {% endif %} {% endif %} <!--manufacturer END--> </ul> </div> </div> </nav> </div> </div> </div> </div> {% endif %}  
      menu.php
      <?php class ControllerCommonMenu extends Controller { public function index() { $this->load->language('common/menu'); // Menu $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { if ($category['top']) { // Level 2 $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[] = array( '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']) ); } // Level 1 $data['categories'][] = array( 'name' => $category['name'], 'children' => $children_data, 'column' => $category['column'] ? $category['column'] : 1, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } } return $this->load->view('common/menu', $data); } }  
      ajaxMenu.zip
    • By valerykurak
      Здравствуйте, есть свой контроллер, ссылка вида test/test. Можно ли сделать так, чтобы этих урлов было больше? К примеру test/test-first, test/test-second и т.д.?
    • By valerykurak
      Здравствуйте, есть пользователи из бд и я хочу чтобы при клике на имя (там расположена ссылка на страницу с детальной информацией) изменялся стиль на странице с детальной информацией. В голове примерно так выглядит но не знаю как довести до ума.        
      $('.information-information-14 .card--info:nth-child(8) .card--link').on("click", function(){
                  $('.guestbook-entry .card--info3:nth-child(4)').css('display', 'block');
              });
    • By valerykurak
      Здравствуйте, реализованы фильтры через атрибуты товара. Проблема в том, что атрибуту можно указать лишь одно значение, можно ли после какого-либо знака: например ; увеличивать количество значений?
  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.