essentially, I have a purchased a module to allow VAT Exemption, the user fills out a form as a step in the one page checkout.
The plugin is pretty basic and only contains a couple of fields, which I need more such as Charity Address and other information.
I dont want to overwrite the modules core files as this is bad practice, I am looking to extend it so that I can add additional fields to the save method.
Any pointers? I have been through a few tutorials on creating another module to extend the module's controller but for some reason no matter what I do I get no feedback at all.
All the tutorials I have seen all seem to extend the core controllers, which is pretty basic but doesn't seem to apply to my situation.
How do I go about this in Magento CE 1.9
Edit: Below is my current code for the my custom module that should overwrite another module, where is this going wrong?
etc/module/MyName_VatExemptExtended.xml
<?xml version="1.0"?>
<config>
<modules>
<MyName_VatExemptExtended>
<active>true</active>
<codePool>local</codePool>
<depends>
<Indies_Vatexempt/>
</depends>
</MyName_VatExemptExtended>
</modules>
</config>
local/MyName/VatExemptExtended/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<MyName_VatExemptExtended>
<version>0.0.1</version>
</MyName_VatExemptExtended>
</modules>
<frontend>
<routers>
<vatexempt>
<args>
<use>standard</use>
<modules>
<MyName_VatExemptExtended before="Indies_Vatexempt_OnepageController">MyName_VatExemptExtended_OnepageController</MyName_VatExemptExtended>
</modules>
</args>
</vatexempt>
</routers>
</frontend>
</config>
local/MyName/VatExemptExtended/controllers/OnepageController.php
<?php
require_once Mage::getModuleDir('controllers','Indies_Vatexempt_OnepageController').DS.Adminhtml.DS.'OnepageController.php';
echo "DD";
class GiantPeach_VatExemptExtended_OnepageController extends Indies_Vatexempt_OnepageController
{
public function __construct()
{
echo "__construct";
die();
}
public function saveExemptAction()
{
echo "saveExemptAction";
die();
}
}
As you can see, at the moment I just want it to display something from my extended controller. I can see my custom module appearing in the Magento backend so it's loading the module ok, however, in my config if I force an error (by unclosing a tag or writing some rubbish outside of tags) I don't receive any visible syntax errors. Is my module being loaded correctly?
Thanks