2015-08-28 131 views
0

我正在学习Magento。在这方面我遵循这个(http://www.opensourceforwebtechnologies.com/create-custom-model-in-magento/)教程。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表中的条目。

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

enter image description here

这里是我的core_resource表的截图。

enter image description here

可以在任何一个可以帮助我经营我的安装脚本?谢谢

回答

0

如果它没有显示在核心资源表中,那么这意味着你还没有创建模块的XML文件。

  1. 回到这个位置的应用程序的/ etc /模块/
  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. 而且千万要记得刷新缓存系统>>高速缓存管理

而且进入系统>配置>高级>高级,看看你的模块出现在是否禁用模块输出列表。