Answer the question
In order to leave comments, you need to log in
Variable output in OpenCart header?
Hello! I have implemented a function in which I can insert a variable in the admin in the category title and the value of this variable is displayed.
I want to copy and implement the same for the name, but it doesn't work. Maybe someone will tell. Thanks in advance
It was like this: (catalog/controller/product/category.php)
if ($category_info) {
$m = $category_info['meta_title'];
$d = $category_info['meta_description'];
$t = $this->config->get('config_new');
$new_title = str_replace('names', $t, $m);
$new_desc = str_replace('names', $t, $d);
$this->document->setTitle($new_title);
$this->document->setDescription($new_desc);
if ($category_info) {
$m = $category_info['meta_title'];
$d = $category_info['meta_description'];
$a = $category_info['meta_h1'];
$t = $this->config->get('config_new');
$new_title = str_replace('names', $t, $m);
$new_desc = str_replace('names', $t, $d);
$new_h1 = str_replace('names', $t, $a);
$this->document->setTitle($new_title);
$this->document->setDescription($new_desc);
$this->document->setDescription($new_h1);
if ($category_info['meta_h1']) {
$data['heading_title'] = $category_info['meta_h1'];
} else {
$data['heading_title'] = $category_info['name'];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question