Skip to content

How to get and show customer reward points in Magento Enterprise

September 15, 2011

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;
Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: