initHeader(); $this->assignGeneralPurposeVariables(); require_once _PS_MODULE_DIR_ . 'pagecache/pagecache.php'; $result = PageCache::execDynamicHooks($this); if (Tools::version_compare(_PS_VERSION_,'1.6','>')) { $this->context->smarty->assign(array( 'js_def' => PageCache::getJsDef($this), )); $result['js'] = $this->context->smarty->fetch(_PS_ALL_THEMES_DIR_.'javascript.tpl'); } $this->context->cookie->write(); // Most of configurations to compress requests do not include 'application/json' so we use 'text/html' header('Content-Type: text/html'); header('Cache-Control: no-cache'); header('X-Robots-Tag: noindex'); $json = json_encode($result); if ($json === false) { header("HTTP/1.1 500 Internal Server Error"); die(json_last_error_msg()); } die($json); } public function isRestrictedCountry() { return $this->restrictedCountry; } public function geolocationManagementPublic($default_country) { $ret = $this->geolocationManagement($default_country); if (!$ret) { return $default_country; } return $ret; } }