1
votes

Sorry for my english.

Just a question. In my magento, when i refresh statistics in Reports / Resfresh statistics, it's okay but it redirects me on the homepage of my website. I solved this problem by changing two lines code in app/code/core/Mage/adminhtml/controllers/Report/StatisticsController.php. But it's better to create "an override". So i decided to create a module in app/code/local/myname/.

I have my file in app/etc/modules myname_all.xml wich contains :

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

Next, I create app/code/local/Myname/AdminExtras/Adminhtml/etc/config.xml which contains

<?xml version="1.0"?>
<config>
<modules>
    <MyName_AdminExtras>
        <version>0.1.0</version>
    </MyName_AdminExtras>
</modules>
<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <MyName_AdminExtras before="Mage_Adminhtml">MyName_AdminExtras_Adminhtml</MyName_AdminExtras>
                </modules>
            </args>
        </adminhtml>
   </routers>
</admin>

And finally, i created a folder named controllers which contains another folder named Report and the file named StatisticsController.php which is calling the base file /app/code/core/Mage/Adminhtml/controllers/Report/StatisticController.php

But it doesn't word. File is not calling by Magento.

What's wrong ?

1

1 Answers

1
votes

Hum sorry i found the answer. My folders weren't ok. I just follow this way :

App/code/local/MyName/AdminExtras/controllers/adminhtml.. instead of App/code/local/MyName/AdminExtras/Adminhtml/controllers