问题
Here is the controller code
if($fortParams['Result'] == 'CAPTURED'){
Tools::redirect('index.php?controller=order-confirmation);
}else{
$this->setTemplate('module:knetPayment/views/templates/front/confirm.tpl');
}
tpl file code
<h2>your payment succeasdadss. </h2>
and output is only displaying message with no header footer leftcolumn
回答1:
I had the same problem. I was migrating a module from 1.6 to 1.7. Finally, I solved the issue by modifying my .tpl file so that it includes {block ...} information. In your case, try modifying your .tpl content like this:
{extends file='page.tpl'}
{block name='page_content'}
<h2>your payment succeasdadss. </h2>
{/block}
Apparently, it seems as if in 1.7 it is necessary to use some extra smarty tags
来源:https://stackoverflow.com/questions/49943365/prestashop-1-7-set-template-header-footer-not-displaying