prestashop 1.7 设置模板 .header 页脚不显示 [英] prestashop 1.7 set template .header footer not displaying

查看:77
本文介绍了prestashop 1.7 设置模板 .header 页脚不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是控制器代码

 if($fortParams['Result'] == 'CAPTURED'){
        Tools::redirect('index.php?controller=order-confirmation);    
    }else{
        $this->setTemplate('module:knetPayment/views/templates/front/confirm.tpl');

    }

tpl 文件代码

<h2>your payment succeasdadss. </h2> 

并且输出仅显示没有页眉页脚 leftcolumn 的消息

and output is only displaying message with no header footer leftcolumn

推荐答案

我遇到了同样的问题.我正在将一个模块从 1.6 迁移到 1.7.最后,我通过修改我的 .tpl 文件解决了这个问题,使其包含 {block ...} 信息.在您的情况下,尝试像这样修改您的 .tpl 内容:

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}

显然,在 1.7 中似乎有必要使用一些额外的 smarty 标签

Apparently, it seems as if in 1.7 it is necessary to use some extra smarty tags

这篇关于prestashop 1.7 设置模板 .header 页脚不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆