/** * @see Mage_Core_Model_Cache * * @param Mage_Core_Model_Observer $observer */ public function onCategorySave($observer) { $category = $observer->getCategory(); /* @var $category Mage_Catalog_Model_Category */ if ($category->getData('include_in_menu')) { // notify user that hypernode needs to be refreshed Mage::app()->getCacheInstance()->invalidateType(array('hypernode')); } return $this; }
/** * Event observer set empty template to Related Product blocks * @param Mage_Core_Model_Observer $observer */ public function unsetRelatedProductsBlock($observer) { if (Mage::helper('boughttogether')->checkVersion('1.4.1.0')) { if (Mage::helper('boughttogether')->isDisabled()) { return; } $block = $observer->getEvent()->getBlock(); if (is_object($block)) { $className = get_class($block); if (in_array($className, $this->_clear)) { $name = $block->getNameInLayout(); $alias = $block->getBlockAlias(); $newBlock = $block->getLayout()->createBlock('boughttogether/empty')->setBlockAlias($alias); $block->getLayout()->setBlock($name, $newBlock); } } } }
/** * If the magento version is Enterprise Edition we have to change the Stub * we extend from * * @param Mage_Core_Model_Observer $observer Observer with event information * * @return void */ public function coreCollectionAbstractLoadBefore($observer) { $isStoreCollection = $observer->getCollection() instanceof Mage_Core_Model_Resource_Store_Collection; if (!$isStoreCollection) { // we only want to hook up the first call of this event. // The first call is for the store collection return; } // Mage_Core_Model_Resource_Store_Collection // only replace if the version is EE and has a // Enterprice_Pci module installed if ((string) Mage::getConfig()->getNode('modules/Enterprise_Pci/active')) { Mage::getConfig()->setNode('global/helpers/core/encryption_model', 'Ikonoshirt_Pbkdf2_Model_Stub_EE'); } }