|
hi all
i am getting mad.. i successfully customized a front end controller.. and now i should do the same in the backend.. and somehow i just dont get it to work. can anybody see my error? thanks a lot. i assume the error is somewhere in the config.xml.. it was once working, but then it was called not via the /admin/ url which it obiously needs to be called.. i just dont see it..
my files look as follows:
app/etc/modules/MyNameSpace_All.xml
<?xml version="1.0"?> <config> <modules> <MyNameSpace_MyModule> <active>true</active> <codePool>local</codePool> <depends> <Mage_Sales /> </depends> </MyNameSpace_MyModule> </modules> </config>
app/code/local/MyNameSpace/MyModule/etc/config.xml
<?xml version="1.0"?> <config> <modules> <MyNameSpace_MyModule> <version>0.1.0</version> </MyNameSpace_MyModule> </modules> <global> <rewrite> <mynamespace_mymodule_sales_shipment> <from><![CDATA[#^/admin/sales_shipment/pdfshipments/$#]]></from> <to>/admin/mymodule/sales_shipment/pdfshipments</to> </mynamespace_mymodule_sales_shipment> </rewrite> </global> <adminhtml> <routers> <mynamespace_mymodule> <use>admin</use> <args> <module>MyNameSpace_MyModule</module> <frontName>mymodule</frontName> </args> </mynamespace_mymodule> </routers> </adminhtml> </config>
and then the actual code where i try to overload the pdfshipments function.. in app/code/local/MyNameSpace/MyModule/controllers/Adminhtml/Sales/ShipmentController.php
class MyNameSpace_MyModule_Adminhtml_Sales_ShipmentController extends Mage_Adminhtml_Sales_ShipmentController {
public function pdfshipmentsAction(){ //... } }
|