Jump to content

Постоянные ошибки "Undefined index: children in"

Recommended Posts

В журнале ошибок при любом действии на сайте возникают массово такие предупреждения:


2020-08-31 15:52:10 - PHP Notice:  Undefined index: children in /var/www/u0518618/data/www/alluresex.ru/catalog/view/theme/pixelshop/template/extension/module/category.tpl on line 13
2020-08-31 15:52:10 - PHP Notice:  Undefined index: children in /var/www/u0518618/data/www/alluresex.ru/catalog/view/theme/pixelshop/template/extension/module/category.tpl on line 14
2020-08-31 15:52:10 - PHP Notice:  Undefined index: children in /var/www/u0518618/data/www/alluresex.ru/catalog/view/theme/pixelshop/template/extension/module/category.tpl on line 19


Вот сам код файла:


<div class="container-accordion-menu">
    <div class="box-heading"><i class="fa fa-bars"></i><?php echo $heading_title; ?></div>
    <ul class="navcategory">
        <?php foreach ($categories as $category) { ?>
        <?php if ($category['children']) { ?>    
            <li class="<?php if ($category['category_id'] == $category_id) { ?>parent-category active<?php } else { ?>parent-category<?php } ?>">
                <a class="parent-link" href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?>
                <span class="dropdown_icon1"><i class="fa fa-angle-down arrow"></i></span>
                    <div class="dropdown-menu-category">                            
                        <div class="col-menu-12">
                            <?php foreach ($category['children'] as $child) { ?>    
                                <div class="child-box-cell <?php if($child['children']) { ?> child_children<?php } ?>">
                                    <?php if($child['children']) { ?>
                                        <a class="sub-category-link" href="<?php echo $child['href']; ?>"><span class="dropdown_icon1"><i class="fa fa-angle-down arrow"></i></span><?php echo $child['name']; ?></a>
                                    <?php } else { ?>
                                        <a class="sub-category-link" href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a>
                                    <?php } ?>
                                        <?php if($child['children']) { ?>
                                            <div class="child2-box">
                                                <?php foreach ($child['children'] as $child) { ?>
                                                <div class="child_children_link">
                                                    <a href="<?php echo $child['href']; ?>"><i class="fa fa fa-level-up fa-rotate-90"></i> <?php echo $child['name']; ?></a>
                                                <?php } ?>
                                        <?php } ?>
                                <?php } ?>
            <?php } else { ?>
                <li class="parent-category no-child"><a class="parent-link" href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
            <?php } ?>
        <?php } ?>


В чем может быть причина? Куда смотреть?

Автор шаблона ответил, что причина не в шаблоне. Ему я доверяю, ибо много помогал при установке и настройке, все быстро и качественно.

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.

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.

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