Magento does not show all categories in admin

we have a magento store with different categories one inside the other (subcategory). Our problem is that when we introduce an administrator to manage categories in the category tree on the left, some of our categories that have subcategories correctly look at the plus sign (+) on the left, but when we try to expand the category magento, 't show any item.

Ajax points to this URL:

index.php / admin / catalog_category / categoriesJson / key / 09b218741dce69171825fdbf4954855d /? IsAjax = true

and it returns an empty array without any errors. Frontend displays all categories correctly.

Magento version 1.4.2.1

Any idea?

+3
source share
5 answers

catalog_category_entity , 1 2, , 7. , 7 , , , Magento 2, lavel 7, .

2, , , .

1? ...

+2

catalog_category_entity

SQL-:

UPDATE catalog_category_entity SET children_count =
(SELECT COUNT(*) FROM
(SELECT * FROM catalog_category_entity) AS table2
WHERE path LIKE
CONCAT(catalog_category_entity.path,"/%"));
+2

( )? Magento, - , . , , "" , .

, !

,

+1

"" . , , , 2 .

2 :

    foreach ($ categories as $ category) {
        $ category = $ category-> load ($ category-> getId ());

        $ level = $ category-> getLevel ();

        if ($ level> 2) {
            $ category-> setLevel (2);
            $ category-> save ();
        }

    }

+1
source

In these cases, this query could help:

select c.entity_id cid, p.entity_id pid
from 
  catalog_category_entity c
  inner join catalog_category_entity p on c.parent_id = p.entity_id
where c.level != p.level+1

This did not help me with my categories.

0
source

Source: https://habr.com/ru/post/1796257/


All Articles