okzt Posted June 21, 2012 Share Posted June 21, 2012 Добрый день уважаемые форумчане. Вопрос такой: установлен opencart ocstore 1.5.1.3 Хотелось бы выделить отдельный пункт верхнего меню категорий отдельным цветом, или что еще лучше подгружать каждый пункт отдельной картинкой. Такое вообще возможно? поиском пользовался, единственное что нашел так это платный модуль выделения цветом...но до покупки както не созрел...бюджет не позволяет. Link to comment Share on other sites More sharing options...
Legsmaster Posted June 21, 2012 Share Posted June 21, 2012 а поподробней Link to comment Share on other sites More sharing options...
okzt Posted June 22, 2012 Author Share Posted June 22, 2012 Прилагаю скрин, надеюсь так понятнее. Link to comment Share on other sites More sharing options...
iWalker Posted June 22, 2012 Share Posted June 22, 2012 Вы имеете в виду изменить цвет именно активного пункта? Ну т.е. пункта, в котором пользователь находится в настоящее время? Link to comment Share on other sites More sharing options...
okzt Posted June 22, 2012 Author Share Posted June 22, 2012 Я имел ввиду сделать этот пункт постоянно таким цветом, как бы выделить его по отношению к другим. Link to comment Share on other sites More sharing options...
AlexFisher Posted June 23, 2012 Share Posted June 23, 2012 Можно сделать его элементарно выделенным другим цветом/фончиком при условии, что он выделенный будет. Ну, то-бишь в нем на данный момент будет покупатель находиться. В его категории. А если под определенное кол-во кнопочек у каждой свой цветмозгфейерверкен - это врукопашную, я думаю, быстрее будет ;) Link to comment Share on other sites More sharing options... okzt Posted June 25, 2012 Author Share Posted June 25, 2012 А если под определенное кол-во кнопочек у каждой свой цветмозгфейерверкен - это врукопашную, я думаю, быстрее будет ;)Именно так. И собственно и хотел спросить совета...врукопашную в каком направлении копать? С чего начать? Link to comment Share on other sites More sharing options... milus Posted June 27, 2012 Share Posted June 27, 2012 вот вам пример на opencart'е http://livedemo00.template-help.com/opencart_38887/ откройте любым браузером с поддержкой кода и посмотрите как все устронено Link to comment Share on other sites More sharing options... AlexFisher Posted June 28, 2012 Share Posted June 28, 2012 Боюсь, файрбаг здесь не поможет. Это кодовая часть, а то, что покажет "инспектор элементов" - это уже сформированная страница. Тут немного не туда нужно рыть. Надо считывать активную категорию, а затем ее в tpl'е метить. Думаю, что можно вывести сбоку категории через схему, они-ж выделяются каким-то образом. И глянуть, как это в модуле выводится. Сегодня нет времени - завтра попробую покопаться и отпишусь здесь. Link to comment Share on other sites More sharing options... ravilr Posted June 28, 2012 Share Posted June 28, 2012 не знаю как там сделано и как правильно, но можно так. в header.tpl применительно к вашему коду <div id="menu"> <ul> <?php $c=0;?> <?php foreach ($categories as $category) { ?> <li><a href="<?php echo $category['href']; ?>" class="color-<?php echo $c++; ?>"><?php echo $category['name']; ?></a> <?php if ($category['children']) { ?> <div> итд на выходи получим у каждого пункта меню свой класс с порядковым номером. 1 Link to comment Share on other sites More sharing options... 7 months later... sobwoofer Posted February 6, 2013 Share Posted February 6, 2013 Приветствую колеги, тема очень полезная, нашли решения, молодцы. я вот мозг себе сломал но не додумался.. может хто поможет.. Теми же функциями хочу наделить свой движок, но вот у меня стоит модуль меню http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3987 и xml там делает в хедере тпл следующее <file name="catalog/view/theme/*/template/common/header.tpl"> <operation> <search position="replace"><![CDATA[<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>]]></search> <add><![CDATA[ <li><a href="http://i-mebli.com/aksii.html">Текущие акции</a> </li> <li style="<?php if ($category['children'][$i]['image'] && !$category['mega']) { ?>text-align: center;<?php } ?><?php if ($category['children'][$i]['children2nd'] && $category['children'][$i]['mega']) { ?> background-image: url('catalog/view/theme/default/image/menu_arrow.png'); <?php } ?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php if ($category['children'][$i]['image'] && !$category['mega']) { ?> <?php } ?> <?php echo $category['children'][$i]['name']; ?></a> <?php if ($category['children'][$i]['children2nd']) { ?> <?php if ($category['children'][$i]['mega']) { ?> <div> <ul> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <li style="background-image:url('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center; line-height:32px; text-indent:32px;"><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } else { ?> <li><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } ?> <?php } ?> <?php } ?></ul></div><?php } else { ?> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal; text-align:left;font-weight:normal;color:#a0e0ff; ('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } else { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;font-weight:normal;color:#60b3db;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } ?> <?php } ?> <?php } ?><?php } ?><?php } ?> </li> ]]></add> </operation> Был бы благодарен за помощь. Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 0 Go to topic listing Similar Content Как объединить товары с разным цветом в один, с добавлением цветов в доп. изображениях и опциях? By Focster2019, February 20 3 replies 173 views buslikdrev February 21 [Поддержка] ColorAsProduct - цвета товара как отдельные товары 1 2 3 4 10 By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 239 replies 31,961 views sevvvvvvko January 5 свой ocmod.zip не устанавливает файлы By vladimir911, 9 hours ago 2 replies 36 views vladimir911 1 hour ago ColorAsProduct - цвета товара как отдельные товары By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 0 comments 18,032 views Leingard December 3, 2017 В настройках темы по умолчанию пропал пункт темы... By iveger, February 9 7 replies 232 views Tom March 4 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Поддержка и ответы на вопросы Шаблоны, дизайн и оформление магазина Отдельный пункт меню своим цветом или изображением. Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × 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. I accept
okzt Posted June 25, 2012 Author Share Posted June 25, 2012 А если под определенное кол-во кнопочек у каждой свой цветмозгфейерверкен - это врукопашную, я думаю, быстрее будет ;)Именно так. И собственно и хотел спросить совета...врукопашную в каком направлении копать? С чего начать? Link to comment Share on other sites More sharing options...
milus Posted June 27, 2012 Share Posted June 27, 2012 вот вам пример на opencart'е http://livedemo00.template-help.com/opencart_38887/ откройте любым браузером с поддержкой кода и посмотрите как все устронено Link to comment Share on other sites More sharing options... AlexFisher Posted June 28, 2012 Share Posted June 28, 2012 Боюсь, файрбаг здесь не поможет. Это кодовая часть, а то, что покажет "инспектор элементов" - это уже сформированная страница. Тут немного не туда нужно рыть. Надо считывать активную категорию, а затем ее в tpl'е метить. Думаю, что можно вывести сбоку категории через схему, они-ж выделяются каким-то образом. И глянуть, как это в модуле выводится. Сегодня нет времени - завтра попробую покопаться и отпишусь здесь. Link to comment Share on other sites More sharing options... ravilr Posted June 28, 2012 Share Posted June 28, 2012 не знаю как там сделано и как правильно, но можно так. в header.tpl применительно к вашему коду <div id="menu"> <ul> <?php $c=0;?> <?php foreach ($categories as $category) { ?> <li><a href="<?php echo $category['href']; ?>" class="color-<?php echo $c++; ?>"><?php echo $category['name']; ?></a> <?php if ($category['children']) { ?> <div> итд на выходи получим у каждого пункта меню свой класс с порядковым номером. 1 Link to comment Share on other sites More sharing options... 7 months later... sobwoofer Posted February 6, 2013 Share Posted February 6, 2013 Приветствую колеги, тема очень полезная, нашли решения, молодцы. я вот мозг себе сломал но не додумался.. может хто поможет.. Теми же функциями хочу наделить свой движок, но вот у меня стоит модуль меню http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3987 и xml там делает в хедере тпл следующее <file name="catalog/view/theme/*/template/common/header.tpl"> <operation> <search position="replace"><![CDATA[<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>]]></search> <add><![CDATA[ <li><a href="http://i-mebli.com/aksii.html">Текущие акции</a> </li> <li style="<?php if ($category['children'][$i]['image'] && !$category['mega']) { ?>text-align: center;<?php } ?><?php if ($category['children'][$i]['children2nd'] && $category['children'][$i]['mega']) { ?> background-image: url('catalog/view/theme/default/image/menu_arrow.png'); <?php } ?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php if ($category['children'][$i]['image'] && !$category['mega']) { ?> <?php } ?> <?php echo $category['children'][$i]['name']; ?></a> <?php if ($category['children'][$i]['children2nd']) { ?> <?php if ($category['children'][$i]['mega']) { ?> <div> <ul> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <li style="background-image:url('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center; line-height:32px; text-indent:32px;"><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } else { ?> <li><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } ?> <?php } ?> <?php } ?></ul></div><?php } else { ?> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal; text-align:left;font-weight:normal;color:#a0e0ff; ('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } else { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;font-weight:normal;color:#60b3db;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } ?> <?php } ?> <?php } ?><?php } ?><?php } ?> </li> ]]></add> </operation> Был бы благодарен за помощь. Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 0 Go to topic listing Similar Content Как объединить товары с разным цветом в один, с добавлением цветов в доп. изображениях и опциях? By Focster2019, February 20 3 replies 173 views buslikdrev February 21 [Поддержка] ColorAsProduct - цвета товара как отдельные товары 1 2 3 4 10 By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 239 replies 31,961 views sevvvvvvko January 5 свой ocmod.zip не устанавливает файлы By vladimir911, 9 hours ago 2 replies 36 views vladimir911 1 hour ago ColorAsProduct - цвета товара как отдельные товары By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 0 comments 18,032 views Leingard December 3, 2017 В настройках темы по умолчанию пропал пункт темы... By iveger, February 9 7 replies 232 views Tom March 4 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Поддержка и ответы на вопросы Шаблоны, дизайн и оформление магазина Отдельный пункт меню своим цветом или изображением. Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax
AlexFisher Posted June 28, 2012 Share Posted June 28, 2012 Боюсь, файрбаг здесь не поможет. Это кодовая часть, а то, что покажет "инспектор элементов" - это уже сформированная страница. Тут немного не туда нужно рыть. Надо считывать активную категорию, а затем ее в tpl'е метить. Думаю, что можно вывести сбоку категории через схему, они-ж выделяются каким-то образом. И глянуть, как это в модуле выводится. Сегодня нет времени - завтра попробую покопаться и отпишусь здесь. Link to comment Share on other sites More sharing options... ravilr Posted June 28, 2012 Share Posted June 28, 2012 не знаю как там сделано и как правильно, но можно так. в header.tpl применительно к вашему коду <div id="menu"> <ul> <?php $c=0;?> <?php foreach ($categories as $category) { ?> <li><a href="<?php echo $category['href']; ?>" class="color-<?php echo $c++; ?>"><?php echo $category['name']; ?></a> <?php if ($category['children']) { ?> <div> итд на выходи получим у каждого пункта меню свой класс с порядковым номером. 1 Link to comment Share on other sites More sharing options... 7 months later... sobwoofer Posted February 6, 2013 Share Posted February 6, 2013 Приветствую колеги, тема очень полезная, нашли решения, молодцы. я вот мозг себе сломал но не додумался.. может хто поможет.. Теми же функциями хочу наделить свой движок, но вот у меня стоит модуль меню http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3987 и xml там делает в хедере тпл следующее <file name="catalog/view/theme/*/template/common/header.tpl"> <operation> <search position="replace"><![CDATA[<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>]]></search> <add><![CDATA[ <li><a href="http://i-mebli.com/aksii.html">Текущие акции</a> </li> <li style="<?php if ($category['children'][$i]['image'] && !$category['mega']) { ?>text-align: center;<?php } ?><?php if ($category['children'][$i]['children2nd'] && $category['children'][$i]['mega']) { ?> background-image: url('catalog/view/theme/default/image/menu_arrow.png'); <?php } ?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php if ($category['children'][$i]['image'] && !$category['mega']) { ?> <?php } ?> <?php echo $category['children'][$i]['name']; ?></a> <?php if ($category['children'][$i]['children2nd']) { ?> <?php if ($category['children'][$i]['mega']) { ?> <div> <ul> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <li style="background-image:url('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center; line-height:32px; text-indent:32px;"><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } else { ?> <li><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } ?> <?php } ?> <?php } ?></ul></div><?php } else { ?> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal; text-align:left;font-weight:normal;color:#a0e0ff; ('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } else { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;font-weight:normal;color:#60b3db;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } ?> <?php } ?> <?php } ?><?php } ?><?php } ?> </li> ]]></add> </operation> Был бы благодарен за помощь. Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 0 Go to topic listing Similar Content Как объединить товары с разным цветом в один, с добавлением цветов в доп. изображениях и опциях? By Focster2019, February 20 3 replies 173 views buslikdrev February 21 [Поддержка] ColorAsProduct - цвета товара как отдельные товары 1 2 3 4 10 By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 239 replies 31,961 views sevvvvvvko January 5 свой ocmod.zip не устанавливает файлы By vladimir911, 9 hours ago 2 replies 36 views vladimir911 1 hour ago ColorAsProduct - цвета товара как отдельные товары By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 0 comments 18,032 views Leingard December 3, 2017 В настройках темы по умолчанию пропал пункт темы... By iveger, February 9 7 replies 232 views Tom March 4 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Поддержка и ответы на вопросы Шаблоны, дизайн и оформление магазина Отдельный пункт меню своим цветом или изображением.
ravilr Posted June 28, 2012 Share Posted June 28, 2012 не знаю как там сделано и как правильно, но можно так. в header.tpl применительно к вашему коду <div id="menu"> <ul> <?php $c=0;?> <?php foreach ($categories as $category) { ?> <li><a href="<?php echo $category['href']; ?>" class="color-<?php echo $c++; ?>"><?php echo $category['name']; ?></a> <?php if ($category['children']) { ?> <div> итд на выходи получим у каждого пункта меню свой класс с порядковым номером. 1 Link to comment Share on other sites More sharing options... 7 months later... sobwoofer Posted February 6, 2013 Share Posted February 6, 2013 Приветствую колеги, тема очень полезная, нашли решения, молодцы. я вот мозг себе сломал но не додумался.. может хто поможет.. Теми же функциями хочу наделить свой движок, но вот у меня стоит модуль меню http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3987 и xml там делает в хедере тпл следующее <file name="catalog/view/theme/*/template/common/header.tpl"> <operation> <search position="replace"><![CDATA[<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>]]></search> <add><![CDATA[ <li><a href="http://i-mebli.com/aksii.html">Текущие акции</a> </li> <li style="<?php if ($category['children'][$i]['image'] && !$category['mega']) { ?>text-align: center;<?php } ?><?php if ($category['children'][$i]['children2nd'] && $category['children'][$i]['mega']) { ?> background-image: url('catalog/view/theme/default/image/menu_arrow.png'); <?php } ?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php if ($category['children'][$i]['image'] && !$category['mega']) { ?> <?php } ?> <?php echo $category['children'][$i]['name']; ?></a> <?php if ($category['children'][$i]['children2nd']) { ?> <?php if ($category['children'][$i]['mega']) { ?> <div> <ul> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <li style="background-image:url('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center; line-height:32px; text-indent:32px;"><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } else { ?> <li><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } ?> <?php } ?> <?php } ?></ul></div><?php } else { ?> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal; text-align:left;font-weight:normal;color:#a0e0ff; ('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } else { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;font-weight:normal;color:#60b3db;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } ?> <?php } ?> <?php } ?><?php } ?><?php } ?> </li> ]]></add> </operation> Был бы благодарен за помощь. Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 0 Go to topic listing Similar Content Как объединить товары с разным цветом в один, с добавлением цветов в доп. изображениях и опциях? By Focster2019, February 20 3 replies 173 views buslikdrev February 21 [Поддержка] ColorAsProduct - цвета товара как отдельные товары 1 2 3 4 10 By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 239 replies 31,961 views sevvvvvvko January 5 свой ocmod.zip не устанавливает файлы By vladimir911, 9 hours ago 2 replies 36 views vladimir911 1 hour ago ColorAsProduct - цвета товара как отдельные товары By Leingard, December 3, 2017 товар цвета (and 2 more) Tagged with: товар цвета рекомендуемые комплекты 0 comments 18,032 views Leingard December 3, 2017 В настройках темы по умолчанию пропал пункт темы... By iveger, February 9 7 replies 232 views Tom March 4 Recently Browsing 0 members No registered users viewing this page.
sobwoofer Posted February 6, 2013 Share Posted February 6, 2013 Приветствую колеги, тема очень полезная, нашли решения, молодцы. я вот мозг себе сломал но не додумался.. может хто поможет.. Теми же функциями хочу наделить свой движок, но вот у меня стоит модуль меню http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3987 и xml там делает в хедере тпл следующее <file name="catalog/view/theme/*/template/common/header.tpl"> <operation> <search position="replace"><![CDATA[<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>]]></search> <add><![CDATA[ <li><a href="http://i-mebli.com/aksii.html">Текущие акции</a> </li> <li style="<?php if ($category['children'][$i]['image'] && !$category['mega']) { ?>text-align: center;<?php } ?><?php if ($category['children'][$i]['children2nd'] && $category['children'][$i]['mega']) { ?> background-image: url('catalog/view/theme/default/image/menu_arrow.png'); <?php } ?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php if ($category['children'][$i]['image'] && !$category['mega']) { ?> <?php } ?> <?php echo $category['children'][$i]['name']; ?></a> <?php if ($category['children'][$i]['children2nd']) { ?> <?php if ($category['children'][$i]['mega']) { ?> <div> <ul> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <li style="background-image:url('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center; line-height:32px; text-indent:32px;"><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } else { ?> <li><a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a></li> <?php } ?> <?php } ?> <?php } ?></ul></div><?php } else { ?> <?php for ($k=0; $k < count($category['children'][$i]['children2nd']); $k++) { ?> <?php if (isset($category['children'][$i]['children2nd'][$k])) { ?> <?php if (!$category['children'][$i]['children2nd'][$k]['mega'] && $category['children'][$i]['children2nd'][$k]['image']) { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal; text-align:left;font-weight:normal;color:#a0e0ff; ('<?php echo $category['children'][$i]['children2nd'][$k]['image']; ?>'); background-repeat:no-repeat;background-position: left center;"><?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } else { ?> <a href="<?php echo $category['children'][$i]['children2nd'][$k]['href']; ?>" style="font-weight:normal;text-align:left;font-weight:normal;color:#60b3db;">» <?php echo $category['children'][$i]['children2nd'][$k]['name']; ?></a> <?php } ?> <?php } ?> <?php } ?><?php } ?><?php } ?> </li> ]]></add> </operation> Был бы благодарен за помощь. Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 0
Recommended Posts