【发布时间】:2013-02-13 17:58:41
【问题描述】:
我需要导航菜单方面的帮助。当我在管理面板中添加新类别时,导航菜单未显示任何类别。导航菜单中根本没有显示任何类别。
这是我对导致问题的数据库所做的操作。
截断表catalog_category_entity;
截断表catalog_category_entity_datetime;
截断表catalog_category_entity_decimal;
截断表catalog_category_entity_int;
截断表catalog_category_entity_text;
截断表catalog_category_entity_varchar;
截断表catalog_category_product;
截断表catalog_category_product_index;
插入catalog_category_entity(entity_id,entity_type_id,attribute_set_id,parent_id,created_at,updated_at,path,position,level@) (1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),(2,3 ,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
插入catalog_category_entity_int(value_id,entity_type_id,attribute_id,store_id,entity_id,value) 值 (1,3,32,0,2,1),(2,3, 32,1,2,1);
插入catalog_category_entity_varchar(value_id,entity_type_id,attribute_id,store_id,entity_id,value) 值 (1,3,31,0,1,'根目录'),(2 ,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),( 5,3,33,0,2,'default-category');
运行上述查询后,导航菜单中的所有类别都消失了,即使我在管理面板中添加更多类别,也没有显示类别。
我检查了 top.phtml 文件,代码 $this->getStoreCategories() 没有返回任何内容。
我该如何解决这个问题?
谢谢
【问题讨论】:
-
您尝试更新索引了吗?
-
您到底为什么要在数据库级别执行此操作?模型的存在是有原因的。
-
您是否已将默认类别添加到您的商店?并且您是否检查过您的所有类别都将“在菜单中显示”选项设置为“是”?请在管理员中检查并重新索引一次。
标签: magento navigation categories