[+] Added hook in maintenance page

This commit is contained in:
thoma202
2013-10-02 11:58:35 +02:00
parent e68c124218
commit eb7655e318
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -575,6 +575,9 @@ class FrontControllerCore extends Controller
header('HTTP/1.1 503 temporarily overloaded');
$this->context->smarty->assign($this->initLogoAndFavicon());
$this->context->smarty->assign(array(
'HOOK_MAINTENANCE' => Hook::exec('displayMaintenance', array()),
));
$template_dir = ($this->context->getMobileDevice() == true ? _PS_THEME_MOBILE_DIR_ : _PS_THEME_DIR_);
$this->smartyOutputContent($template_dir.'maintenance.tpl');
+3
View File
@@ -13,6 +13,9 @@
<hook id="actionValidateOrder" live_edit="0">
<name>actionValidateOrder</name><title>New orders</title><description/>
</hook>
<hook id="displayMaintenance" live_edit="0">
<name>displayMaintenance</name><title>Maintenance Page</title><description>This hook displays new elements on the maintenance page</description>
</hook>
<hook id="actionPaymentConfirmation" live_edit="0">
<name>actionPaymentConfirmation</name><title>Payment confirmation</title><description>This hook displays new elements after the payment is validated</description>
</hook>
+3
View File
@@ -40,11 +40,14 @@
</head>
<body>
<div id="maintenance">
<p><img src="{$logo_url}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}"{/if} alt="logo" /><br /><br /></p>
{$HOOK_MAINTENANCE}
<p id="message">
{l s='In order to perform website maintenance, our online store will be temporarily offline.'}<br /><br />
{l s='We apologize for the inconvenience and ask that you please try again later.'}
</p>
<span style="clear:both;">&nbsp;</span>
</div>
</body>