I have followed few instructions found in this forum, but I must be missing something. I am trying to override Contacts controller, specifically postAction method. Here is what I have got:
Magento version: 1.9.3.1;
Namespace: MageOverload;
Module: ContactsModule;
/app/code/local/MageOverload/ContactsModule/etc/config.xml:
<?xml version="1.0"?>
<config>
<modules>
<MageOverload_ContactsModule>
<version>1.0.0</version>
</MageOverload_ContactsModule>
</modules>
<frontend>
<routers>
<contactsmodule>
<args>
<modules>
<MageOverload_ContactsModule before="Mage_Contacts">MageOverload_ContactsModule</MageOverload_ContactsModule>
</modules>
</args>
</contactsmodule>
</routers>
</frontend>
</config>
/app/etc/modules/MageOverload_ContactsModule.xml:
<?xml version="1.0"?>
<config>
<modules>
<MageOverload_ContactsModule>
<active>true</active>
<codePool>local</codePool>
</MageOverload_ContactsModule>
</modules>
</config>
/app/code/local/MageOverload/ContactsModule/controllers/IndexController.php:
<?php
require_once Mage::getModuleDir('controllers', 'Mage_Contacts') . DS . 'IndexController.php';
class MageOverload_ContactsModule_IndexController extends Mage_Contacts_IndexController
{
public function postAction() {
//... custom code
}
}
I have flushed cache, custom module is visible via magento admin panel, but still the system is using Mage core files for Contacts. Any help would be greatly appreciated.