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

Overload admin customer controller
 
BoostMyShop
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2008-06-11
France
 

Hello smile

i need to add a section to the admin/customer /edit/id/XX

So i created a new module, added the tab that links to admin/customer /quotations/id/XX but i dont know how to overlad the controller in order to display my own page.

I add a look to http://www.magentocommerce.com/wiki/how_to_overload_a_controller but i didnt succeed…

In order to test, i added the foloowing section to my config.xml:

<rewrite>
            <!-- 
This is an identifier for your rewrite that should be unique -->
            <
MDN_Quotation_admin_customer_quotations>
                <
from><![CDATA[#^/admin/customer/quotations/$#]]></from>
                
<to>/admin/customer/wishlist/id/139</to>
            </
MDN_Quotation_admin_customer_quotations>
        </
rewrite>

but i still have a 404 page :(

Please smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
poulpillusion
Member
 
Avatar
Total Posts:  34
Joined:  2008-08-11
 

Hi olixelle,

Dis you eventually find the solution ?

Thanks…

 
Magento Community Magento Community
Magento Community
Magento Community
 
BoostMyShop
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2008-06-11
France
 

no....
i changed my link in order to go to “quotations/customer/id/139/” instead of “admin/customer/id/139/” so magento use another controller

 
Magento Community Magento Community
Magento Community
Magento Community
 
poulpillusion
Member
 
Avatar
Total Posts:  34
Joined:  2008-08-11
 

I found the solution in this thead : http://www.magentocommerce.com/boards/viewthread/9878/

Now it works for me smile

EDIT : no, it doesn’t work fully… the save() function IS overloaded, but then I have a 404… probably a rewrite problem…

 
Magento Community Magento Community
Magento Community
Magento Community
 
poulpillusion
Member
 
Avatar
Total Posts:  34
Joined:  2008-08-11
 

Ok I found the solution for the 404 :

I already had these lines in my config.xml :

<quai13_rotation_adminhtml_customer_save>
                <
from><![CDATA[#^/admin/customer/save/$#]]></from>
                
<to>/rotation/adminhtml_customer/save/</to>
            </
quai13_rotation_adminhtml_customer_save>

It had a bad side effect : the whole controller was overriden, instead of just overloading the saveAction() function…

So I simply added these lines to my config.xml (just before the above lines), in order to “partially reverse” the overloading process :

<quai13_rotation_adminhtml_customer>
                <
from><![CDATA[#^/rotation/customer/$#]]></from>
                
<to>/admin/customer/</to>
            </
quai13_rotation_adminhtml_customer>

Now it’s ok : only the saveAction() function is overloaded.

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