5

Let's get a customer save process from the admin panel as an example. We have an event observer for model_save_before and trying to get a set of values for the model that have been changed upon the saving process. On the customer model load in \Magento\Framework\Model\AbstractModel::load we have a correct value in the model's _origData property. However, during the saving process the system goes through \Magento\Customer\Model\ResourceModel\CustomerRepository::save and we have the customer model with _origData property empty in the model_save_before (or even model_save_after) event observer after. Is there some way to get the customer's _origData somehow and don't have it cleared in the middle of the saving process? Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.