创建进入Magento的catalog_product_entity_int表的product属性

时间:2011-10-12 20:11:22

标签: php magento

在Magento中,我正在尝试创建一个产品属性,该属性将进入Product EAV系统的整数表。但是,当我创建属性时,似乎该属性将变为varchar table。

以下是我用于模块设置脚本的代码:

    <?php
$installer = $this;

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$installer->startSetup();

$setup->addAttribute('catalog_product', 'review_index', array(

'type' => 'int',
'backend'=> '',
'visible' => 0,
'required' => 0,
'user_defined' => 1,

));

$installer->endSetup();

编辑:根据请求,在eav_attribute表中输入此行的内容:

entity_type_id: 4

attribute_code: review_index

attribute_model: NULL

backend_model: <blank>

backend_type: int

backend_table: <blank>

frontend_model: <blank>

frontend_input: text

frontend_label: <blank>

frontend_class: <blank>

source_model: <blank>

is_required: 0

is_user_defined: 1

default_value: <blank>

is_unique: 0

note: <blank>

任何人都知道我做错了什么?

1 个答案:

答案 0 :(得分:0)

此属性的数据库中存储的设置是什么?它将在eav_attribute表中。