In my custom module customer_save_after and customer_address_save_after are there.

when placing the order customer_save_after and customer_address_save_after these two events firing.

What is the relation between sales_order_save_after and customer_save_after, customer_address_save_after?

how to restrict customer_save_after and customer_address_save_after events when place the order?

I think customer & customer address events are firing because shipping address or billing addresses are Create/updating is happening.

How to restrict customer event from my custom module while placing the order?


  • 1
    What do you mean by 'restrict' Sep 10, 2015 at 6:34

2 Answers 2


I don't think customer_address_save_after and customer_save_after_events are firing while an order is creating.

Address related informations of an order will fire following two events.

  1. sales_quote_address_save_after
  2. sales_order_address_save_after

customer_save_after event is firing when a new customer is created. When we careate an order, I am not sure a new customer is creating for an order. (most probably it is not going to happen).

So the answer to your question is, there is no relation between sales_order_save_after and customer_save_after, customer_address_save_after.

So first make sure that those customer related events are firing while an order is creating in your system. If you are damn sure those events are firing, then you can put this filtering in your observer (ie in customer_save_after and customer_address_save_after).

if (Mage::app()->getRequest()->getRequestedRouteName() == 'customer') {

     //do your magic here

Above if condition makes sure the action is triggering from the route customer and hence it will fire only when a customer related actions are carried out.


Set a flag into customer like:


in onepage checkout actions.

And rewrite every Observer class that does something with this event. You'd need to find all observers in config.xml files. You can easily use grep command for this. There is preDispatch in Mage_Checkout_OnepageController which could be rewritten and set your flag to true.

  • setMyFlagRestrict is customer attribute or ? Sep 14, 2015 at 11:09
  • It isn't an attribute. It's a simple key/value. Sep 14, 2015 at 12:01

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.