/** * Send relative path (from Magento base url) to our app/partials directory * * @return string */ public function partialsurlAction() { if (!$this->_helper->isEnabledInAdmin()) { $this->_sendJson(array('success' => false, 'message' => 'Not authorized'), self::UNAUTHORIZED); return $this; } $this->_sendJson($this->_partialsDir, self::SUCCESS); }
public function indexAction() { // Get current layout state $this->_initAction(); if ($this->_helper->isEnabled()) { // create and render the designer UI html interface $block = $this->getLayout()->createBlock('pan_jewelrydesigner/designer')->setTemplate('application.phtml'); } else { // create and render the disabled designer interface $block = $this->getLayout()->createBlock('pan_jewelrydesigner/template')->setTemplate('disabled.phtml'); } $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml'); $this->getLayout()->getBlock('content')->append($block); $this->_initLayoutMessages('core/session'); $this->renderLayout(); }
/** * Check if customer or an admin is logged in and return a boolean value * * @return boolean */ public function authorizeAction() { $loggedIn = $this->_helper->isCustomerLoggedIn(); $this->_sendJson(array('logged_in' => $loggedIn), self::SUCCESS); }