【问题标题】:Magento Installer Script is not runningMagento 安装程序脚本未运行
【发布时间】:2015-08-28 16:34:08
【问题描述】:

我正在学习 Magento。在这方面,我正在关注这个 (http://www.opensourceforwebtechnologies.com/create-custom-model-in-magento/) 教程。

我的 config.xml 文件如下所示

<?xml version="1.0"?>
<config>
    <modules>
        <Easylife_Helloworld>
            <version>0.1.0</version>
        </Easylife_Helloworld>
    </modules>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Easylife_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
        <layout>
            <updates>
                <helloworld>
                    <file>helloworld.xml</file>
                </helloworld>
            </updates>
        </layout>
    </frontend>
    <global>
        <blocks>
            <helloworld>
                <class>Easylife_Helloworld_Block</class>
            </helloworld>
        </blocks>
        <models>
            <helloworld>
                <class>Easylife_Helloworld_Model</class>
                <resourceModel>helloworld_resource</resourceModel>
            </helloworld>
            <helloworld_resource>
                <class>Easylife_Helloworld_Model_Resource</class>
                <entities>
                    <helloworld>
                        <table>helloworld</table>
                    </helloworld>
                </entities>
            </helloworld_resource>
        </models>
        <resources>
            <helloworld_setup>
                <setup>
                    <class>Mage_Core_Model_Resource_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </helloworld_setup>
            <helloworld_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </helloworld_read>
            <helloworld_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </helloworld_write>
        </resources>
    </global>
</config>

我也读过这个 (Create a new table from magento module) 问题。

数据库中的core_resource 表中没有条目。

我的脚本位置如下图所示。

这是我的core_resource 表的屏幕截图。

谁能帮我运行我的安装脚本??谢谢

【问题讨论】:

    标签: php magento


    【解决方案1】:

    如果它没有显示在核心资源表中,则表示您尚未创建模块的 xml 文件。

    1. 转到此位置 app/etc/modules/
    2. 在您的示例 Easylife_Helloworld.xml 中创建一个名为 {{name_spac}}_{{module_name}}.xml 的 xml 文件。打开这个文件并写下这个:

      <?xml version="1.0"?>
      <config>
          <modules>
               <Fontis_FeedsGenerator>
                   <active>true</active>
                   <codePool>local</codePool> /*This is your module location in app/code/ */
               </Fontis_FeedsGenerator>
         </modules>
      </config>
      
    3. 记得刷新缓存系统>>缓存管理

    同时进入系统>配置>高级>高级,看看你的模块是否出现在“禁用模块输出”列表中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-26
      • 2018-05-28
      • 1970-01-01
      • 2011-01-06
      • 1970-01-01
      • 2012-12-12
      相关资源
      最近更新 更多