It is required to overwrite customer_resource class. I added required config.xml
options for resource rewriting, but when overwritten class method calls parent class method from itself, it actually called the parent method from which I extend to, nor the parent of Mage_Customer_Model_Resource_Customer
:
class My_Plugin_Model_Resource_Customer extends Mage_Customer_Model_Resource_Customer
{
protected function _beforeSave(Varien_Object $customer){
parent::_beforeSave($customer);
...
}
}
So, how to call parent method correctly in this case ? some kind of double downcasting is possible in PHP?
Update:
if found some solution, but not sure if it worked for me, cause via the customer_entity
table it still not saves customer correctly:
call_user_func(array(get_parent_class(get_parent_class($this)),
'_beforeSave', $customer));