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){

So, how to call parent method correctly in this case ? some kind of double downcasting is possible in PHP?


if found some solution, but not sure if it worked for me, cause via the customer_entity table it still not saves customer correctly:

                       '_beforeSave', $customer));

1 Answer 1


The easiest solution, in particular this case, was to call:


as the required parent of Mage_Customer_Model_Resource_Customer is Mage_Eav_Model_Entity_Abstract it will call the grandparent.

also, there is method with ReflectionMethod->invoke()

more info here: https://stackoverflow.com/questions/12850802/how-to-call-grandparent-method-without-getting-e-strict-error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.