2015-08-28 130 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. 而且千萬要記得刷新緩存系統>>高速緩存管理

而且進入系統>配置>高級>高級,看看你的模塊出現在是否禁用模塊輸出列表。