I am trying to customize the Products Ordered report so that it only shows a summary of the products th开发者_如何学Pythonat have an SKU starting with XX. I have been following the tutorial at http://magentocoder.jigneshpatel.co.in/reports/create-custom-reports-in-magento-admin/ to extend the module, but this tutorial shows how to extend the report by adding code to the "core" code pool, which will cause problems further down the road. I have been unable to get the modifications to work using the "local" code pool, because of the confusing nature of the Magento configuration files...
Has anyone successfully extended this (or a similar) report by making the modifications in the "local" code pool? There doesn't seem to be much in terms of documentation or tutorials surrounding this topic, which I find surprising.
Any help is greatly appreciated.
The simplest way is to copy the folder/file structure from /core downwards and recreate the bit you want inside /local - so app/code/local/Mage/Adminhtml/Block ... etc.
This works for PHP files, the local folder comes first in the include path so files there will be preferred over core, but I'm not sure about the config.xml...I think it would be fine though (you'd need the whole file, with your additions, as it won't read the core version at all).
This will leave core files intact, but if the files you've copied change in an update you'll need to take those changes and put them in your version.
Doing it as a standalone module would be possible, but is a bit hard to explain in an answer...the AW_Blog module is a good one to look at for working out what the config files do though.
精彩评论