0
votes

I have tried to add a custom menu button in two different languages

I use the default template

I have edited these files inside my OpenCart main folder:

  1. header.tpl on /catalog/view/theme/yourthemefolder/template/common
  2. header.php on /catalog/language/english and /catalog/language/yourlanguage
  3. header.php on /catalog/controller/common

and added these lines

1

<li><a href="http://xxxxxxxx/shop/index.php?route=product/manufacturer"><?php echo $new_gamintojai; ?></a></li>

2

$_['new_gamintojai'] = 'Brands';

3

$this->data['new_gamintojai'] = $this->language->get('new_gamintojai');

I can click on the button, but there is no text. How can I fix this?

1

1 Answers

0
votes

Okey I have figured it out myself.

Have changed this line :

$this->data['new_gamintojai'] = $this->language->get('new_gamintojai');

to

$data['new_gamintojai'] = $this->language->get('new_gamintojai');