diff --git a/admin-dev/themes/default/template/layout.tpl b/admin-dev/themes/default/template/layout.tpl
index 3edb3edb1..485b35d07 100644
--- a/admin-dev/themes/default/template/layout.tpl
+++ b/admin-dev/themes/default/template/layout.tpl
@@ -22,7 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
-
+{$header}
{if isset($conf)}
{$conf}
@@ -91,3 +91,4 @@
{if !$bootstrap}
{/if}
{$page}
{if !$bootstrap}
{/if}
+{$footer}
\ No newline at end of file
diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php
index 0ce276087..5b85c4e81 100644
--- a/classes/controller/AdminController.php
+++ b/classes/controller/AdminController.php
@@ -682,6 +682,7 @@ class AdminControllerCore extends Controller
'export_content' => $content
)
);
+
$this->layout = 'layout-export.tpl';
}
@@ -1372,12 +1373,14 @@ class AdminControllerCore extends Controller
foreach (array('errors', 'warnings', 'informations', 'confirmations') as $type)
$this->context->smarty->assign($type, $this->json ? Tools::jsonEncode(array_unique($this->$type)) : array_unique($this->$type));
- $this->context->smarty->assign('page', $this->json ? Tools::jsonEncode($page) : $page);
-
- if (!$this->ajax)
- $this->smartyOutputContent(array($header_tpl, $this->layout, $footer_tpl));
- else
- $this->smartyOutputContent($this->layout);
+ $this->context->smarty->assign(array(
+ 'page' => $this->json ? Tools::jsonEncode($page) : $page,
+ 'header' => $this->context->smarty->fetch($header_tpl),
+ 'footer' => $this->context->smarty->fetch($footer_tpl)
+ )
+ );
+
+ $this->smartyOutputContent($this->layout);
}
/**