/** * Return common data to send to JS * * @return array */ protected function getCommonJSData() { $data = parent::getCommonJSData(); if (!\XLite::isAdminZone()) { $data += $this->getCloudSearchInitData(); } return $data; }
/** * Get head prefixes * * @return array */ public static function defineHTMLPrefixes() { $list = parent::defineHTMLPrefixes(); $list['og'] = 'http://ogp.me/ns#'; $list['fb'] = 'http://ogp.me/ns/fb#'; if (\XLite\Core\Config::getInstance()->CDev->GoSocial->fb_app_namespace) { $ns = \XLite\Core\Config::getInstance()->CDev->GoSocial->fb_app_namespace; $list[$ns] = 'http://ogp.me/ns/' . $ns . '#'; } return $list; }
/** * Display content for the AJAX requests * * @param string $content Content to display * * @return void */ protected function displayAJAXContent($content) { // Dispatch events \XLite\Core\Event::getInstance()->display(); \XLite\Core\Event::getInstance()->clear(); // Send headers. TODO: Should be one header sending point. \XLite\View\Controller::sendHeaders(); // Display content echo '<h2 class="ajax-title-loadable">' . $this->getTitle() . '</h2>'; echo '<div class="ajax-container-loadable">' . $content . '</div>'; exit(0); }
/** * Return common data to send to JS * * @return array */ protected function getCommonJSData() { $data = parent::getCommonJSData(); $data['a2cp_enable_for_dropping'] = \XLite\Core\Config::getInstance()->XC->Add2CartPopup->a2cp_enable_for_dropping; return $data; }