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 1.3.0.2 (click to view content)

Here's an example of implementing a MageRewards Points Transfer standard event dispatch.

Other Events to Observe

  • In app\code\community\TBT\Rewards\Model\Tag.php:
Mage::dispatchEvent('rewards_new_tag', array('tag'=>&$this));
  • In app\code\community\TBT\Rewards\Model\Poll.php:
Mage::dispatchEvent('rewards_poll_new_vote', array('poll'=>&$this));
  • 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:
Mage::dispatchEvent('rewards_new_customer_create', array('customer'=>&$this));

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"

Still need help? Get Help Get Help