本文整理汇总了PHP中Mage_XmlConnect_Controller_Action类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_XmlConnect_Controller_Action类的具体用法?PHP Mage_XmlConnect_Controller_Action怎么用?PHP Mage_XmlConnect_Controller_Action使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_XmlConnect_Controller_Action类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preDispatch
/**
* 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;
}
}
示例2: preDispatch
/**
* 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;
}
}
示例3: preDispatch
/**
* Declare content type header
*
* @return null
*/
public function preDispatch()
{
parent::preDispatch();
$this->getResponse()->setHeader('Content-type', 'text/html; charset=UTF-8');
}