您的位置:首页 > 其它

[Magento] How to add new fields?

2012-12-26 18:54 453 查看


How to add new fields in magento e-commerce?

There is no easy method like adding product attribute for categoryyet. But we can achieve this by adding from database. You just needto deal with three tables in the database.

First one is: eav_attribute

Insert details as: [change as you need]

01
`attribute_id`
=
''
,
02
`entity_type_id`
= 9,
03
`attribute_code`
=
'logo_size'
,
04
`attribute_model`
= NULL,
05
`backend_model`
=
''
,
06
`backend_type`
=
'text'
,
07
`backend_table`
=
''
,
08
`frontend_model`
=
''
,
09
`frontend_input`
=
'textarea'
,
10
`frontend_label`
=
'EmbroiderySize
Options'
,
11
`frontend_class`
= NULL,
12
`source_model`
=
''
,
13
`is_required`
= 0,
14
`is_user_defined`
= 0,
15
`default_value`
=
''
,
16
`is_unique`
= 0,
17
`note`
=
''
Note the inserted attribute_id's value and insert data on anothertable: eav_entity_attribute

1
`entity_attribute_id`
=
''
,
2
`entity_type_id`
= 9,
3
`attribute_set_id`
= 12,
4
`attribute_group_id`
= 7,
5
`attribute_id`
=968, [attribute_id you get from first tableinsert]
6
`sort_order`
= 8
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: