MageRewards Event Dispatches
Here's a list of Event dispatches that are made by MageRewards. If you're extending MageRewards you can implement Observers to these events using the standard methods.
Observer Rewards Transfer Events
These events are based on the "Mage_Core_Model_Abstract" class. You can get the current points transfer by reading the event object's 'rewards_transfer' attribute (ie $obj->getEvent()->getRewardsTransfer() ).
As of MageRewards 1.10.0 (click to view content)
As of MageRewards 22.214.171.124 (click to view content)
Event Event Code
After a full save rewards_transfer_save_after
Before a full save rewards_transfer_save_before
After committing a save rewards_transfer_save_commit_after
Before committing a save rewards_transfer_save_commit_before
After a full load rewards_transfer_load_after
Before a full load rewards_transfer_load_before
After a full delete rewards_transfer_delete_after
Before a full delete rewards_transfer_delete_before
After committing a delete rewards_transfer_delete_commit_after
Before committing a delete rewards_transfer_delete_commit_before
Other Events to Observe
- In app\code\community\TBT\Rewards\Model\Tag.php:
- In app\code\community\TBT\Rewards\Model\Poll.php:
- In app\code\community\TBT\Rewards\Model\Newsletter.php:
Mage::dispatchEvent('rewards_newsletter_new_subscription', array('subscriber' => $newSubscriberInst));
- In app\code\community\TBT\Rewards\Model\Customer.php:
You'll find examples of how observers have been setup for some of these events in the MageRewards config.xml file available in "/community/TBT/Rewards/etc/config.xml"