каким образом можно вставить его в хедер без добавления этой функции в header.php?
Почитайте про глобальные переменные
Но судя по вопросу вы хотите выводить заголовок не в category.tpl, а в header.tpl, или и там и там.
Для этого в контроллере category.php найдите где присваивается значение переменной $data['heading_title'] и скопируйте этот код в header.php
if (isset($this->request->get['path'])) {
$url = '';
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$path = '';
$parts = explode('_', (string)$this->request->get['path']);
$category_id = (int)array_pop($parts);
foreach ($parts as $path_id) {
if (!$path) {
$path = (int)$path_id;
} else {
$path .= '_' . (int)$path_id;
}
$category_info = $this->model_catalog_category->getCategory($path_id);
if ($category_info) {
$data['breadcrumbs'][] = array(
'text' => $category_info['name'],
'href' => $this->url->link('product/category', 'path=' . $path . $url)
);
}
}
} else {
$category_id = 0;
}
$category_info = $this->model_catalog_category->getCategory($category_id);
if ($category_info) {
if ($category_info['meta_h1']) {
$data['heading_title'] = $category_info['meta_h1'];
} else {
$data['heading_title'] = $category_info['name'];
}
}
Либо работайте через $this->document->
Для примера посмотрите как передается title страницы.