One of the cool features in Magento Enterprise Edition is the reward points system. It’s very simple to configure and a really good way to make the customer feel «rewarded» for each action that he/she performs on the web.
The reward points are shown by default in «My account» area and also in the checkout process. If we need to show the reward points in any other place on the web, we need to call the enterprise_reward/reward model giving the customer. This is very simple:
$customer_id = Mage::getSingleton('customer/session')->getCustomer()->getID(); $customer = Mage::getModel('customer/customer')->load($customer_id); $rewardpoints = Mage::getModel('enterprise_reward/reward') ->setCustomer($customer) ->setWebsiteId(Mage::app()->getWebsite()->getId()) ->loadByCustomer() ->getCurrencyAmount(); echo $rewardpoints;
- Seen on Green Dot Software (I just added the line to get the $customer_id)