我正在尝试为我的扩展创建一个安装脚本,由于某种原因它不会安装脚本.扩展将显示在core_resource表中,但我尝试创建的属性将不会创建.
我很确定脚本甚至没有被调用,因为我在开头放了一个exit()并且网站运行得很好.
这是我在配置XML文件中的内容.这位于global - > resources路径中:
<nie_setup>
<setup>
<module>Nie_Nie</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</nie_setup>
Run Code Online (Sandbox Code Playgroud)
我的安装脚本如下:
$installer = $this;
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$setup->addAttribute('customer', 'nie_admin', array(
'input' => 'text',
'type' => 'text',
'backend' => '',
'visible' => 0,
'required' => 0,
'user_defined' => 1,
));
$installer->endSetup();
Run Code Online (Sandbox Code Playgroud)
有没有明显的东西我在这里失踪,这将是脚本无法运行的原因?