/** * Check if multiple wishlist is enabled on current store before all other actions * * @return Enterprise_Wishlist_IndexController */ public function preDispatch() { parent::preDispatch(); $action = strtolower($this->getRequest()->getActionName()); $protectedActions = array('createwishlist', 'editwishlist', 'deletewishlist', 'copyitems', 'moveitem', 'moveitems'); if (!Mage::helper('enterprise_wishlist')->isMultipleEnabled() && in_array($action, $protectedActions)) { $this->norouteAction(); } return $this; }
/** * Extend preDispatch * * @return Mage_Core_Controller_Front_Action|void */ public function preDispatch() { parent::preDispatch(); if (!$this->_skipAuthentication && !Mage::getSingleton('customer/session')->authenticate($this)) { $this->setFlag('', 'no-dispatch', true); if (!Mage::getSingleton('customer/session')->getBeforeWishlistUrl()) { Mage::getSingleton('customer/session')->setBeforeWishlistUrl($this->_getRefererUrl()); } Mage::getSingleton('customer/session')->setBeforeWishlistRequest($this->getRequest()->getParams()); } if (!Mage::getStoreConfigFlag('wishlist/general/active')) { $this->norouteAction(); return; } }