天天看點

magento -- 增加會員資訊字段

運作下面的代碼,$attrcode為新增的字段名

<?php

$setup = new mage_eav_model_entity_setup('core_setup');

$attrcode = 'occupation';

$settings = array (

'position' => 1,

'is_required'=> 0

);

$setup->addattribute('1', $attrcode, $settings);

?>