Example #1
0
 /**
  * Make sure customer is logged in
  *
  * @return null
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (!Mage::getSingleton('customer/session')->isLoggedIn() && !Mage::getSingleton('checkout/session')->getQuote()->isAllowedGuestCheckout()) {
         $this->setFlag('', self::FLAG_NO_DISPATCH, true);
         $this->_message($this->__('Customer not logged in.'), self::MESSAGE_STATUS_ERROR, array('logged_in' => '0'));
         return;
     }
 }
 /**
  * Check if customer is logged in
  *
  * @return null
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (!$this->_getCustomerSession()->isLoggedIn()) {
         $this->setFlag('', self::FLAG_NO_DISPATCH, true);
         $this->_message($this->__('Customer not logged in.'), self::MESSAGE_STATUS_ERROR, array('logged_in' => '0'));
         return;
     }
 }
Example #3
0
 /**
  * Declare content type header
  *
  * @return null
  */
 public function preDispatch()
 {
     parent::preDispatch();
     $this->getResponse()->setHeader('Content-type', 'text/html; charset=UTF-8');
 }