I am trying to rewrite Magento Address Model but I'm going crazy with this. My config.xml rewrite section looks like this
<models>
<customer>
<rewrite>
<customer>MyNam_MyMod_Model_Customer</customer>
<address>MyNam_MyMod_Customer_Model_Address</address>
</rewrite>
</customer>
</models>
and my class looks like:
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 address form I get the following error: Call to a member function getId() on a non-object in /var/www/magento/app/code/core/Mage/Customer/Block/Address/Edit.php on line 53
I noticed that edit block is unable to load customer/address model
Can anyone help me?