关于睿艾科技

企业级电子商务及供应链解决方案


手工添加magento实体的属性

新闻添加时间:2010-10-27 10:37:49

magento的数据库采用EAV设计,其中实体有很多个,比如product,category,order等。下面讲一下如何直接操作数据库来,增加 这些实体的属性。

在表eav_entity_type中 找到实例的类型id,entity_type_id。比如catalog_category的类型id为3。
在表eav_attribute中新增一个属性,并记下新增属性 的id,比如504.记得将不要在默认值那里,保存NULL,留空也可以。
在表eav_entity_attribute中 新增一行,将新的属性与实体对应起来。相关的attribute_set_id和attribute_group_id可以在表eav_attribute_set和eav_attribute_group中查询。