I'm trying to rewrite the Magento Address Model, but I'm going crazy with that. My rewrite section of config.xml is as follows:
<models>
<customer>
<rewrite>
<customer>MyNam_MyMod_Model_Customer</customer>
<address>MyNam_MyMod_Customer_Model_Address</address>
</rewrite>
</customer>
</models>
and my class looks like this:
require_once 'Mage/Customer/Model/Address.php';
class MyNam_MyMod_Customer_Model_Address extends Mage_Customer_Model_Address
{
public function validate() {
parent::validate();
}
}
When I load the address form, I get the following error: calling the getId () member function for the non-object in /var/www/magento/app/code/core/Mage/Customer/Block/Address/Edit.php on line 53
I noticed that the editing unit cannot load the client / address model
Can anybody help me?
source
share