相关疑难解决方法(0)

我的Magento扩展安装脚本无法运行

我正在尝试为我的扩展创建一个安装脚本,由于某种原因它不会安装脚本.扩展将显示在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)

有没有明显的东西我在这里失踪,这将是脚本无法运行的原因?

php installation attributes install magento

30
推荐指数
3
解决办法
5万
查看次数

标签 统计

attributes ×1

install ×1

installation ×1

magento ×1

php ×1