Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7851497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:11:57+00:00 2026-06-02T19:11:57+00:00

I am trying to edit the reports generated from here, example.com/index.php/admin/sales_order/index/ . I need

  • 0

I am trying to edit the reports generated from here, example.com/index.php/admin/sales_order/index/. I need to add a new report to the dropdown on the right.

I traced this page to it’s controller through the url and dumped the class.
app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php indexAction() and got this class Ext4mage_Html2pdf_Sales_OrderController so I know it’s being overridden by a module. In this case the Ext4mage Html2pdf module.

This controller just overwrites the pdf methods using,

require_once BP.'/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php';
class Ext4mage_Html2pdf_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController{
//etc }

So I’ve created my new module in local, hoping to overwrite this as it’s in community.
app/code/local/Daves/OrderModule/controllers/Sales/OrderController.php and placed in the following.

require_once 'Mage'.DS.'Adminhtml'.DS.'controllers'.DS.'Sales'.DS.'OrderController.php';
require_once BP.'/app/code/community/Ext4mage/Html2pdf/controllers/Sales/OrderController.php';

class Daves_OrderModule_Sales_OrderController extends Ext4mage_Html2pdf_Sales_OrderController{

    public function indexAction(){

        die();

        return parent::indexAction();
    }

}

My expected functionality would be that upon reloading the Sales/Order page in admin, I’d get a blank page, and I don’t. Which would mean that my controller isn’t being loaded.

My IDE is showing that the classes are being extended, and putting a die() into an indexAction() method in the Ext4mage_Html2pdf controller works as expected. It’s just missing out my controller for some reason.

Trying to hit the controller directly in a browser using example.com/admin/daves_ordermodule/sales_order/index also throws a 404.

Should I be trying to overwrite the blocks instead?

I’ve not created any funky <rewrite> update handles in my config, mainly because I’m not sure if I need them, or where they would go. As I know Magento takes from Zend in it’s horrific use of xml, I’ll paste in my configs here.


app/etc/modules/Daves_OrderModule.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Daves_OrderModule>
            <active>true</active>
            <codePool>local</codePool>
            <depends> <!-- same as in the /app/etc/Mage_All.xml -->
                <Mage_Reports/>
                <Mage_Adminhtml/>
                <Ext4mage_Html2pdf/>
            </depends>
        </Daves_OrderModule>
    </modules>
</config>

app/code/local/Daves/OrderModule/etc/config.xml

0.1

    <global>
        <blocks>
            <daves_ordermodule> <!-- this is the class group  and must be lowercase-->
                <class>Daves_OrderModule_Block</class> <!-- this is how you access it -->
            </daves_ordermodule>
        </blocks>
        <helpers>
            <daves_ordermodule>
                <class>Daves_OrderModule_Helper</class> <!-- Mage::helper('squaresphere_module/<helper>'); -->
            </daves_ordermodule>
        </helpers>
        <models>
            <daves_ordermodule>
                <class>Daves_OrderModule_Model</class> <!-- Mage::getModel('squaresphere_module/<model>'); -->
            </daves_ordermodule>
        </models>

    </global>

    <!-- How to get to the module from the browser -->
    <admin>
        <routers>
            <daves_ordermodule> <!-- My unique class group -->
                <use>admin</use> <!-- which router class? -->
                <args>
                    <module>Daves_OrderModule</module> <!-- assumes /controllers -->
                    <frontName>daves_ordermodule</frontName> <!-- what is on the url -->
                </args>
            </daves_ordermodule>
        </routers>
    </admin>

</config>

app/code/community/Ext4mage/Html2pdf/etc/config.xml Specifically nodes

<admin>
    <routers>
        <html2pdf>
            <use>admin</use>
            <args>
                <module>Ext4mage_Html2pdf</module>
                <frontName>html2pdf</frontName>
            </args>
        </html2pdf>
        <emailattachments>
            <args>
                <modules>
                    <Ext4mage_Html2pdf before="Fooman_EmailAttachments">Ext4mage_Html2pdf</Ext4mage_Html2pdf>
                </modules>
            </args>
        </emailattachments>
        <adminhtml>
            <args>
                <modules>
                    <Ext4mage_Html2pdf before="Mage_Adminhtml">Ext4mage_Html2pdf</Ext4mage_Html2pdf>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:11:58+00:00Added an answer on June 2, 2026 at 7:11 pm

    Assuming you have no frontend controllers, adjust your config as follows:

    <!-- How to get to the module from the browser -->
    <admin>
        <routers>
            <adminhtml> <!-- My unique class group -->
                <args>
                    <modules>
                        <Daves_Om before="Ext4mage_Html2pdf">Daves_OrderModule</Daves_Om>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
    

    What this does is add another controllers directory under the Mage_Adminhtml module’s frontname. The value from <Daves_Om> is essentially mapped to the text node + “controllers”, so app/code/(configured codepool)/Daves/OrderModule/controllers/ – and then the typical route matching applies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to edit some SSRS 2008 reports from TFS, but having all kinds
I am trying to remove/edit the text shown in the picture which appears from
edit: I was trying to solve a spoj problem. Here is the link to
I'm converting an Access application to web, and need to print reports from it.
I'm trying to add a web reference to an external Axis - generated web
I'm trying to pass a parameter from php into my javascript function inside html.
Simple question from an absolute n00b. I'm trying to create an edit content screen
I'm trying to edit some .RPT files via VS08/Crystal Reports. Problem is, if i
I'm trying to learn C++11 random stuff, so I've copied an example from this
I am trying to edit a record. I have the default route. When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.