Magento 不显示管理中的所有类别
我们有一个 magento 商店,其中包含各种类别(子类别)。我们的问题是,当我们进入管理员管理左侧类别树中的类别时,我们的一些具有子类别的类别看起来与左侧的加号(+)图标正确,但当我们尝试扩展类别时,magento 却没有不显示任何项目。
ajax 调用指向这个 url:
index.php/admin/catalog_category/categoriesJson/key/09b218741dce69171825fdbf4954855d/?isAjax=true
并返回一个空数组,不会引发任何错误。前端正确显示所有类别。
Magento 版本 1.4.2.1
有什么想法吗?
we have a magento store with various categories one inside another (subcategory). Our problem is that when we enter in the admin to manage categories in the category tree on the left, some of our categories that has subcategories looks correctly with the plus (+) icon on the left but when we try to expand the category magento doesn't display any item.
The ajax call point to this url:
index.php/admin/catalog_category/categoriesJson/key/09b218741dce69171825fdbf4954855d/?isAjax=true
and it returns an empty array without throwing any error. Frontend displays all the categories correctly.
Magento version 1.4.2.1
Any idea ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
对于上述情况,此查询可能会有所帮助:
不过,它对我的类别没有帮助。
For the mentioned cases, this query could have helped:
It didn't help me with my categories, though.
您想要进入表
catalog_category_entity
,运行以下 SQL 查询:
you want to go into table
catalog_category_entity
run the following SQL query:
阅读约瑟夫的答案后,我尝试在catalog_category_entity中搜索错误,发现我的树中的所有类别都具有级别1或2,除了未出现的级别7的类别。奇怪的是,级别7是无论如何,这些类别的正确级别我认为问题是 Magento 找到了级别为 2 的类别,并且它直接子级的级别为 7,并且它不将这些类别识别为父亲类别的子级。
我已将孩子的级别更改为 2,一切似乎都正常。
为什么我的树中的所有类别都是级别 1 ?我不知道 ...
After reading Joseph answer i've tried to search for errors in catalog_category_entity and founded that all the categories in my tree has level 1 or 2 except for the categories that doesn't appear that have level 7. The strange things is that level 7 is the correct level for those category anyway i think that the problem is that Magento found a category with level 2 and it direct children has lavel 7 and it doesn't recognize those category as children for the father category.
I've changed level of the children to 2 and everything seems to work.
Why all the category in my tree has level 1 ? i don't know ...
您是否以编程方式创建类别(而不是使用管理界面)?正如 Magento 中常见的情况一样,当数据库中某些值丢失或不正确时,条目可能根本不会显示。如果是这种情况,请查看数据库中的“良好”类别记录,并确保缺失的类别遵循正确的约定。
希望有帮助!
谢谢,
乔
Did you create the categories programmatically (as opposed to using the admin interface)? As is often the case in Magento, when some value is missing or incorrect in the database, entries may not show up at all. If this is the case, please take a look at a "good" category record in the database and make sure that the missing categories follow the correct conventions.
Hope that helps!
Thanks,
Joe
就我而言,我导入了所有类别并将“级别”指定为其在树中的位置。也许这不是它的目的,因为将所有类别设置为 2 级别效果很好,并且使我的树保持完整。
我曾经在设置错误后将所有级别设置为 2 的代码:
In my case I imported all of the categories and assigned 'level' as its position in the tree. Maybe that isn't what it's for, because setting all the categories to a level of 2 worked beautifully and kept my tree intact.
Code I used to put all levels to 2 after setting it incorrectly: