0
我正在創建默認值爲1的客戶屬性,但在創建屬性後,它不會爲現有客戶設置屬性默認值。Magento:添加客戶屬性不爲現有客戶設置默認值
這是我的安裝腳本
<?php
$installer = $this;
$installer->startSetup();
$setup = Mage::getModel('customer/entity_setup', 'core_setup');
$setup->addAttribute('customer', 'is_activated', array(
'type' => 'int',
'input' => 'select',
'label' => 'Activated',
'global' => 1,
'visible' => 1,
'required' => 0,
'user_defined' => 0,
'default' => 1,
'visible_on_front' => 0,
'source' => 'eav/entity_attribute_source_boolean',
));
$installer->endSetup();