顶部菜单中的Opencart 3.0.2.0和Journal 3主题客户名称 [英] Opencart 3.0.2.0 and Journal 3 theme customer name in Top Menu

查看:59
本文介绍了顶部菜单中的Opencart 3.0.2.0和Journal 3主题客户名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在日记"主题顶部菜单模块上添加客户的名字.我在top-menu.twig中添加了 {{text_logged}} ,但无法从控制器获取text_logged.如何从catalog/controller/common/header.php获取text_logging?

I want to add customer first name on Journal theme top menu module. I am adding {{ text_logged }} in top-menu.twig but it can not get text_logged from controller. How can I get text_logged from catalog/controller/common/header.php?

{% if logged %}
   {{ text_logged }}
{% endif %}

$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true));

我想在Journal主题顶部菜单$ US Dollar上看到"Hello John Do"

I want to see "Hello John Do" on Journal theme top menu $ US Dollar instead

推荐答案

您需要使用ocmod或vqmod将代码添加到Journal主题common/header.tpl中.我强烈建议不要因为荒谬的缓存系统而更改《日刊》的核心代码(即使开发人员也无法摆脱它).另外,这里还有一个解决方案:您可以为此编辑你的目的

You need to add your code using ocmod or vqmod to the Journal theme common/header.tpl. I highly recommend do not change the Journal's core codes because of ridiculous cache system (even devs couldn't get rid of it). Also here is a solution : You can edit this one for your purpose

这篇关于顶部菜单中的Opencart 3.0.2.0和Journal 3主题客户名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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