我尝试了这个,但是没有用。
控制器catalog/controller/common/header.php
查找:return $this->load->view('common/header', $data);
在其之前添加:
if($this->customer->isLogged()){
$data['text_customer_name'] = sprintf($this->language->get('text_customer_name'), $this->customer->getFirstName(), $this->customer->getLastName());
} else {
$data['text_customer_name'] = $this->language->get('text_account');
}
语言
catalog/language/*/common/header.php
添加:
$_['text_customer_name'] = 'Hi %s %s';
查看
catalog/view/theme/*/template/common/header.twig
查找:
{{ text_account }}
Replace with: {{ text_customer_name }}