Beispiel #1
0
 /**
  * Set various variables requested by template
  */
 protected function _prepareTemplateData()
 {
     $maxBalance = (int) Mage::helper('enterprise_reward')->getGeneralConfig('max_points_balance');
     $minBalance = (int) Mage::helper('enterprise_reward')->getGeneralConfig('min_points_balance');
     $balance = $this->_rewardInstance->getPointsBalance();
     $this->addData(array('points_balance' => $balance, 'currency_balance' => $this->_rewardInstance->getCurrencyAmount(), 'pts_to_amount_rate_pts' => $this->_rewardInstance->getRateToCurrency()->getPoints(true), 'pts_to_amount_rate_amount' => $this->_rewardInstance->getRateToCurrency()->getCurrencyAmount(), 'amount_to_pts_rate_amount' => $this->_rewardInstance->getRateToPoints()->getCurrencyAmount(), 'amount_to_pts_rate_pts' => $this->_rewardInstance->getRateToPoints()->getPoints(true), 'max_balance' => $maxBalance, 'is_max_balance_reached' => $balance >= $maxBalance, 'min_balance' => $minBalance, 'is_min_balance_reached' => $balance >= $minBalance, 'expire_in' => (int) Mage::helper('enterprise_reward')->getGeneralConfig('expiration_days'), 'is_history_published' => (int) Mage::helper('enterprise_reward')->getGeneralConfig('publish_history')));
 }