/** * get all spending rules available for current shopping cart * * @return array */ public function getSpendingRules() { $cacheKey = 'spending_rules_array'; if ($this->hasCache($cacheKey)) { return $this->getCache($cacheKey); } $container = new Varien_Object(array('spending_rules' => array())); Mage::dispatchEvent('rewardpoints_block_spend_get_rules', array('container' => $container)); $this->saveCache($cacheKey, $container->getSpendingRules()); return $this->getCache($cacheKey); }