Close

April 30, 2015

Magento EE Quick Tip Reward Points For Order

Just a quick tip that we hope will save some coders some time. We couldn’t find an easy way to get the reward points that were used in a particular order. The snippet below should help.

Magento EE sample code to get reward points used in an order.

require_once('app/Mage.php');
Mage::app();
Mage::app()->setCurrentStore(1); //111113 set the store id.
$objOrder	= Mage::getModel('sales/order')->load(1234);
 
$points=$objOrder->getRewardCurrencyAmountInvoiced();
echo "Used $points points";