Search the Community
Showing results for tags 'скрытие'.
-
7 При покупке доступ к обновлениям в течение 12 месяцев После окончания основного периода доступ к обновлениям можно продолжить 4.00 USD за 12 месяцев Скачать / Купить дополнение Добавил RoS Добавлено 23.10.2023 Категория Меню, дизайн, внешний вид Ioncube Loader Нет ocStore 3.0 2.3.0.2.4 2.3 2.2 2.1 OpenCart.Pro, ocShop Opencart.pro 2.3 Opencart.pro 2.1 OcShop 2.0.3.х Обращение к серверу разработчика Нет
- 7 replies
-
- javacript
- java script
- (and 24 more)
-
Version 1.2.0
Позволяет вам управлять длинным описанием товара. Теперь вы можете скрывать часть текста, чтобы сделать описание более компактным и удобным для чтения, а также предоставлять вашим клиентам возможность развернуть его по желанию. Возможности Расширения: Управление скриптом «Подробнее» для всех товаров или индивидуально; Управление на каких разрешений экранов будет работать скрипт. Демо / Админка Вход: demo / demo Документация Лицензия: Модуль можно установить на один интернет-магазин. Следующий магазин оплачивается отдельно.$7-
- javacript
- java script
- (and 24 more)
-
Всех приветствую! Появилась необходимость скрытия меню от индексации Яндексом на всех страницах категорий, кроме главной страницы. Есть вариант, как это сделать на 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> {% 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'] }}"> - {{ 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'] }}"> - {{ 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> {% 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'] }}"> - {{ 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'] }}"> - {{ 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
- 6 replies
-
- javascript
- яндекс
-
(and 2 more)
Tagged with:
-
Купил у буржуев модуль скрытия пустых категорий, работать не хочет, собака. Обращался к ним за поддержкой, говорят что должен быть оригинальный файл от OpenCart (category.php) и просят доступ по ftp для решения проблемы (не хочется давать). Может вы подскажете, что нужно подкрутить? Ссылка на модуль: http://www.opencart.com/index.php?route=extension/extension/info&extension_id=16011 Модуль работает через vQmod. При установке любого из вариантов скрытия категорий (а их 4) результат - сайт отображает белую страницу и в логе следующая ошибка: 2014-10-17 22:58:54 - PHP Notice: Undefined variable: data in /home/p4push1/domains/4push.ru/public_html/vqmod/vqcache/vq2-catalog_controller_module_category.php on line 69 Код файла vq2-catalog_controller_module_category.php: <?php class ControllerModuleCategory extends Controller { protected function index($setting) { $this->language->load('module/category'); $this->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])) { $this->data['category_id'] = $parts[0]; } else { $this->data['category_id'] = 0; } if (isset($parts[1])) { $this->data['child_id'] = $parts[1]; } else { $this->data['child_id'] = 0; } $this->load->model('catalog/category'); $this->load->model('catalog/product'); $this->data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); //Показывать или нет количество товаров $show_product_count = $this->config->get('config_product_count'); foreach ($categories as $category) { //Будем вычислять кол-во товаров в категориях только если это кол-во надо показывать $PIDs=array(); if ($show_product_count) { $res = $this->model_catalog_product->getTotalProductsID(array('filter_category_id' => $category['category_id'])); foreach ($res as $key=>$value) { $PIDs[$value['product_id']]=$value['product_id']; } } $children_data = array(); $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { //Будем вычислять кол-во товаров в категориях только если это кол-во надо показывать if ($show_product_count) { $data = array( 'filter_category_id' => $child['category_id'], 'filter_sub_category' => true ); $res = $this->model_catalog_product->getTotalProductsID($data); $product_total=count($res); foreach ($res as $key=>$value) { $PIDs[$value['product_id']]=$value['product_id']; } // $total += count($PIDs); } if($this->model_catalog_product->getTotalProducts($data)>0){ $children_data[] = array( 'category_id' => $child['category_id'], 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } } $total = count($PIDs); if($this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id'], 'filter_sub_category' => true))>0){ $this->data['categories'][] = array( 'category_id' => $category['category_id'], 'name' => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $total . ')' : ''), 'children' => $children_data, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/category.tpl')) { $this->template = $this->config->get('config_template') . '/template/module/category.tpl'; } else { $this->template = 'default/template/module/category.tpl'; } $this->render(); } } ?>
-
Всем хай. Ищу модуль, или хак, который позволял бы скрывать некоторые характеристики или опции товара от покупателей - гостей - пользователей. Допустим, что бы вывести закупочную стоимость, менеджеру упростило бы жизнь. Видно сразу 2 цены, закупка и реальная для сайта. Но покупатель ее видеть не должен. Спасибо за помощЬ!