3

I need to create one observer after the customer is logged in.

I found this is the event name customer_login

My point is I installed one third-party module for some requirement. Where that extension has already created that event for their requirement.

I need to create it for some purpose in my own module.

So can I create it in my module? Is that is allowed to create the same event multiple times?

Utsav Gupta
  • 1,243
  • 1
  • 18
  • 48
Jafar Pinjar
  • 1,929
  • 7
  • 64
  • 139

2 Answers2

6

Yes you can create multiple observer for same event

Its broadcast and listener kind of relationship

where the dispatch code is broadcaster and the all observers are listeners

even you can observe same event multiple times in your single module

Murtuza Zabuawala
  • 14,814
  • 9
  • 44
  • 75
1

Yes you can use an event multiple time, but main problem is it's observer firing order and it's controls.

My suggestion is create a separate module with dependency of current third party module, which is currently using same event and dispatch a you own event.

Arun
  • 78
  • 8