Technical Details - Object Rewrites

If you're looking for a list of  MageRewards Event Dispatches go here.

Rewrites are done very carefully to make sure that they don't break upgrades of Magento. This may not be up-to-date so you should check the config.xml or ask a WDCA representative if a rewrite you are wondering about exists.

Update 11/16/2011: As of MageRewards 1.7 (to be released in Q1 2012) most model rewrites will be replaced with observers.

Re-written Models

Since Magento hasn't implemented observers for a lot of events that MageRewards needs to interact with we were forced to resort to rewriting. In the future, we hope Magento implements observers for these models so that we don't have to rewrite them.

Model: Mage_Customer_Model_Poll
Rewrite: TBT_Rewards_Model_Poll

Model: Mage_Sendfriend_Model_Sendfriend
Rewrite: TBT_Rewards_Model_Sendfriend

Model: Mage_Sales_Model_Quote
Rewrite: TBT_Rewards_Model_Sales_Quote

Model: Mage_Sales_Model_Order
Rewrite: TBT_Rewards_Model_Sales_Order

These rewrites are to integrate MageRewards. They will most likely remain consistent with MageRewards as development progresses.

That's right we're rewriting their observer. This accommodates our exclusivity functionality and smooth incorporation between Catalogrule discounts and redemption discounts.

Re-written Blocks

These rewrites ensure that Magento's regular admin interface doens't display our rewards rules. This keeps things neat and organized.

Block: Mage_Adminhtml_Block_Promo_Catalog_Grid
Rewrite: TBT_Rewards_Block_Adminhtml_Promo_Catalog_Grid

Block: Mage_Adminhtml_Block_Promo_Quote_Grid
Rewrite: TBT_Rewards_Block_Adminhtml_Promo_Quote_Grid

Still need help? Get Help Get Help