Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Overriding Adminhtml Question? 
 
myrk
Jr. Member
 
Total Posts:  7
Joined:  2008-04-21
 

Hi, I try to override the Mage/Adminhtml/Sales/Order/CreateController.php (indexAction function) and I try every post on the forum but without success. Here my setup:

Mycompany/Adminhtml/controllers/Sales/Order/CreateController.php
Mycompany/Adminhtml/etc/config.xml
/etc/modules/Mycompany_all.xml

Here the config.xml :

<?xml version="1.0"?>
<config>
<global>
<rewrite>
<Mycompany_adminhtml_sales_order_edit>
<from><![CDATA[#^/admin/sales/order/edit/#]]></from>
<to>/adminhtml/sales_order_edit/</to>
</Mycompany_adminhtml_sales_order_edit>
</rewrite>
</global>

<admin>
<routers>
<Mycompany_adminhtml>
<use>admin</use>
<args>
<module>Mycompany_Adminhtml</module>
<frontName>adminhtml</frontName>
</args>
</Mycompany_adminhtml>
</routers>
</admin>
</config>

And here my CreateController.php :

<?php

require_once ‘Mage/Adminhtml/controllers/Sales/Order/CreateController.php’;

class Mycompany_Adminhtml_Sales_Order_CreateController extends Mage_Adminhtml_Sales_Order_CreateController {

public function indexAction(){
echo “Test”;

}

}
Nothing append..

Do I need something In the layout Sales.xml or not ?
What is my config error?

Thank you

MRK

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

hi dude, you could find your answer at this : http://www.magentocommerce.com/boards/viewthread/25942/

 
Magento Community Magento Community
Magento Community
Magento Community
 
myrk
Jr. Member
 
Total Posts:  7
Joined:  2008-04-21
 

Nice

Thank you..

MRK

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top