prestashop 1.7 set template .header footer not displaying

倾然丶 夕夏残阳落幕 提交于 2019-12-11 14:47:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!