I want to override the controller: "ProductController" from Mage/Catalog.
Namespace: Ziny
Module: AutomaBrasil
My module is on local folder.
Resources like Helpers, Models and Blocks, I override without errors; but controllers I can't.
Ziny/AutomaBrasil/etc/modules/Ziny_AutomaBrasil.xml
<?xml version="1.0"?>
<config>
<modules>
<Ziny_AutomaBrasil>
<active>true</active>
<codePool>local</codePool>
</Ziny_AutomaBrasil>
</modules>
</config>
Ziny/AutomaBrasil/code/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Ziny_AutomaBrasil>
<version>0.1.0</version>
</Ziny_AutomaBrasil>
</modules>
<frontend>
<routers>
<automabrasil>
<use>standard</use>
<args>
<module>Ziny_AutomaBrasil</module>
<frontName>automabrasil</frontName>
</args>
</automabrasil>
<catalog>
<args>
<modules>
<automabrasil before="Mage_Catalog">Ziny_AutomaBrasil</automabrasil>
</modules>
</args>
</catalog>
</routers>
</frontend>
</config>
Ziny/AutomaBrasil/code/controllers/ProductController
<?php
require_once 'Mage/Catalog/controllers/ProductController.php';
class Ziny_AutomaBrasil_controllers_ProductController extends Mage_Catalog_ProductController
{
public function viewAction()
{
die('Dark Souls');
}
}
Nothing happens. The controller hasn't been overriden.
Someone knows what's wrong?