Magento 2: Event Observer
This article shows how you can create event observer in a custom module in Magento 2. In Magento 2, there is a separate xml file where you can define your event observer. For frontend events, you need to write your code in app/code/YourCompany/YourModule/etc/frontend/events.xml and for admin events, you need to write event observer code in … Read more