How to use Magneto events observers??
- Step 1. Create global configuration File
- Step 2. Create module configuration file
- Step 3. Create module model observer
Step 1. Each Module should have one Namespace & Module name. Name space could be some company name etc. & module name should be something that represents module functionality. So let suppose Namespace is ExtendTree and Module name is SimpleObservers. Now Create Global Configuration File inside root directory /app/etc/modules as name "ExtendTree_SimpleObservers.xml"
Step 2. Now Create Module Configuration File inside the directory /app/code/local/ExtendTree/SimpleObservers/etc as name "config.xml"
Step 3. Now next thing is to create model observer inside the directory /app/code/local/ExtendTree/SimpleObservers/Model/ as name "Observer.php"
That's it..!! Now try to place an order, customer registeration, add product to cart, load frontend. It should create a log file inside the directory /var/log
Click here to get this module for free.
"The easy way for everything."