开发者

local vs core controller

I am adding new column and action in the local admin app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php which works fine, however. The local controller/app/code/local/Mage/Adminhtml/Block/Catalog/Product.php is not being used or is not overloading the admin one /app/code/core/Mage/Adminhtml/Block/Catalog/Product.php.

This is almost fresh install of Magento 1.4.0.1. I am the only one working, so i know it is not overloaded by some custom controller. I have disabled all custom modules. I have rolled back most of my changes. I have checked /etc/Modules/Mage_Catalog.xml. Refreshed cache all possible ways, loged in and out. Nothing....still using the core controller copy. why? How do you troubleshoot, meaning, at what moment magento decides us开发者_开发百科ing between core or local copies? ...its even more strange because it does not parse local Adminhtml config.xml but uses local Adminthml copy of Blocks.

I would like to keep everything in local code.


Sorry, my bad...long hours working makes me less careful.

For every module it has to be enabled in local or core space. By default, they all are enabled in the core space. To enable Adminhtml module i had to add Mage_Adminhtml.xml file in app/etc/Modules. In the Mage_Adminhtml.xml file i have to specify local between codePool tags like below:

 <?xml version="1.0"?>
   <config>  
       <modules>  
         <Mage_Adminhtml>
                    <active>true</active>  
                    <codePool>local</codePool>
         </Mage_Adminhtml>   
       </modules>   
  </config> 

My mistake was thinking i needed this for Catalog Module while actually for Adminhtml since I am working with admin controllers. Once added Mage_Adminhtml.xml it uses local controllers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜