Last active
December 29, 2015 08:09
-
-
Save vmasciotta/7641209 to your computer and use it in GitHub Desktop.
Mageno Adminhtml Rewrites config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<modules> | |
<Namespace_Miomodulo> | |
<version>1.0.0</version> | |
</Namespace_Miomodulo> | |
</modules> | |
<!-- l'attributo before="Mage_Adminhtml" è essenziale se vuoi riscrivere il controller lato amministrazione--> | |
<!-- se non si mette quell'attributo, il rewrite non funzionerà --> | |
<admin> | |
<routers> | |
<adminhtml> <!-- se vuoi sovrascrivere un controller del core di magento--> | |
<args> | |
<modules> | |
<!-- ora puoi sovrascrive ogni controller del core--> | |
<namespace_miomodulo before="Mage_Adminhtml">Namespace_Miomodulo</namespace_miomodulo> | |
</modules> | |
</args> | |
</adminhtml> | |
</routers> | |
<routers> | |
<ModuloCommunity> <!-- se vuoi sovrascrivere il controller di un modulo esterno al core. (community o local) --> | |
<args> | |
<modules> | |
<namespace_miomodulo before="Mage_Adminhtml">Namespace_Miomodulo</namespace_miomodulo> | |
</modules> | |
</args> | |
</ModuloCommunity> | |
</routers> | |
</admin> | |
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once Mage::getModuleDir('controllers', 'Mage_Adminhtml') . DS . 'Catalog' . DS . 'ProductController.php'; //faccio il require della classe da estendere | |
class Namespace_Valerio_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController{ | |
public function newAction(){ | |
echo "Ho riscritto il core di newAction"; | |
die; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment