I am trying to extend an extensions controller so I can make changes without hacking about with the vendor's code.
The extension's controller which I can trying to extend is
/app/community/Rewardpoints/controllers/IndexController.php
and it looks like the following
class Rewardpoints_IndexController extends Mage_Core_Controller_Front_Action
{
public function quotationAction(){
}
}
This is what I have so far
1) Enable the module by creating /app/etc/modules/Namespace_ModuleName.xml
<config>
<modules>
<Namespace_ModuleName>
<active>true</active>
<codePool>local</codePool>
<depends>
<Rewardpoints/>
</depends>
</Namespace_ModuleName>
</modules>
</config>
2) Set up the config /app/code/local/Namespace/ModuleName/etc/config.xml
<?xml version="1.0"?>
<config>
<frontend>
<routers>
<rewardpoints>
<args>
<modules>
<Namespace_ModuleName before="Rewardpoints">Namespace_ModuleName</Namespace_ModuleName>
</modules>
</args>
</rewardpoints>
</routers>
</frontend>
</config>
3) Set up the new control- /app/code/local/Namespace/ModuleName/controller.php
class Namespace_ModuleName_IndexController extends Rewardpoints_IndexController
{
public function quotationAction()
{
echo 'test';
exit;
}
}
The error that I am getting though is Fatal error: Class 'Rewardpoints_IndexController' not found in /app/code/local/Namespace/ModuleName/controllers/IndexController.php on line 4