diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index 420e39ef2..64584dd2f 100644 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -667,9 +667,42 @@ class FrontControllerCore extends Controller $this->displayMaintenancePage(); header('HTTP/1.1 403 Forbidden'); - $this->context->smarty->assign($this->initLogoAndFavicon()); + + $this->setMedia(); + $this->initHeader(); + + if (!isset($this->context->cart)) { + $this->context->cart = new Cart(); + } + + if (!$this->useMobileTheme()) { + $this->context->smarty->assign(array( + 'HOOK_HEADER' => Hook::exec('displayHeader'), + 'HOOK_TOP' => Hook::exec('displayTop'), + 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''), + 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''), + 'show_breadcrump' => $this->show_breadcrump, + )); + } else { + $this->context->smarty->assign('HOOK_MOBILE_HEADER', Hook::exec('displayMobileHeader')); + } + + $this->initFooter(); + + $this->context->smarty->assign(array( + 'css_files' => $this->css_files, + 'js_files' => ($this->getLayout() && (bool)Configuration::get('PS_JS_DEFER')) ? array() : $this->js_files, + 'js_defer' => (bool)Configuration::get('PS_JS_DEFER'), + 'errors' => $this->errors, + 'display_header' => $this->display_header, + 'display_footer' => $this->display_footer, + )); + $front_controller = preg_match('/ModuleFrontController$/', get_class($this)) ? new FrontController() : $this; - $this->layout = $front_controller->getTemplatePath($this->getThemeDir().'access-denied.tpl'); + $template = $this->context->smarty->fetch($front_controller->getTemplatePath($this->getThemeDir().'access-denied.tpl')); + $this->context->controller = $this; + $this->context->smarty->assign('template', $template); + $this->layout = $this->getLayout(); } /** diff --git a/themes/hotel-reservation-theme/access-denied.tpl b/themes/hotel-reservation-theme/access-denied.tpl index 14968e4cd..fc039caaf 100644 --- a/themes/hotel-reservation-theme/access-denied.tpl +++ b/themes/hotel-reservation-theme/access-denied.tpl @@ -19,62 +19,18 @@ * @copyright Since 2010 Webkul * @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0 *} - - - - - {$meta_title|escape:'html':'UTF-8'} - - - - - -
- +
+ + {l s='Home Page'} +
-

{l s='Access denied'}

-

{l s='You do not have permission to access this page.'}

- - +
+