public function send() { $sharedImgId = Mage::app()->getRequest()->getParam('aitcg_shared_img_id'); if (!isset($sharedImgId)) { return parent::send(); } if (version_compare(Mage::getVersion(), '1.4.0.0', '<')) { return $this->_send13(); } else { return $this->_send14(); } }
public function send() { parent::send(); $ruleCollection = Mage::getSingleton('rewards/special_validator')->getApplicableRulesOnSendfriend(); foreach ($ruleCollection as $rule) { try { $is_transfer_successful = Mage::helper('rewards/transfer')->transferSendfriendPoints($rule->getPointsAmount(), $rule->getPointsCurrencyId(), $rule->getId()); } catch (Exception $ex) { Mage::getSingleton('core/session')->addError($ex->getMessage()); } if ($is_transfer_successful) { //Alert the customer on the distributed points Mage::getSingleton('core/session')->addSuccess(Mage::helper('rewards')->__('You received %s for sending your friend this product', Mage::getModel('rewards/points')->set($rule))); } } }