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]
<wbr></wbr>
01
|
`attribute_id`
=<wbr></wbr>'',
|
02
|
`entity_type_id`
= 9,
|
03
|
`attribute_code`
=<wbr></wbr>'logo_size',
|
04
|
`attribute_model`
= NULL,
|
05
|
`backend_model`
=<wbr></wbr>'',
|
06
|
`backend_type`
=<wbr></wbr>'text',
|
07
|
`backend_table`
=<wbr></wbr>'',
|
08
|
`frontend_model`
=<wbr></wbr>'',
|
09
|
`frontend_input`
=<wbr></wbr>'textarea',
|
10
|
`frontend_label`
=<wbr></wbr>'EmbroiderySize
Options',
|
11
|
`frontend_class`
= NULL,
|
12
|
`source_model`
=<wbr></wbr>'',
|
13
|
`is_required`
= 0,
|
14
|
`is_user_defined`
= 0,
|
15
|
`default_value`
=<wbr></wbr>'',
|
16
|
`is_unique`
= 0,
|
17
|
`note`
=<wbr></wbr>''
|
Note the inserted attribute_id's value and insert data on anothertable: eav_entity_attribute
1
|
`entity_attribute_id`
=<wbr></wbr>'',
|
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
|
Magento电商平台新增字段方法详解
本文详细介绍了如何在Magento电商平台上通过数据库操作新增字段的方法,包括插入数据到特定的数据库表,如eav_attribute和eav_entity_attribute。教程涵盖了创建自定义属性的过程,如设置属性ID、实体类型ID、属性代码等关键参数。
116

被折叠的 条评论
为什么被折叠?



