/** * @return Mage_Rule_Model_Abstract|void */ protected function _beforeSave() { parent::_beforeSave(); if (is_array($this->getCustomerGroupIds())) { $this->setCustomerGroupIds(join(',', $this->getCustomerGroupIds())); } }
/** * Check rule date integrity * @nelkaake Added on Wednesday October 6, 2010: * * @return Mage_Core_Model_Abstract */ protected function _beforeSave() { if ((int) $this->getPointsAmount() === 0) { throw new Exception(Mage::helper('rewards')->__("The Points Amount (X) field must be greater than zero (0). If you don't want customers to redeem any points, why are you making shopping cart points redemption rule?")); } return parent::_beforeSave(); }