0

Here is my site http://goo.gl/Tsnqzr OC. 1.5.4.

There is contact url in green horizontal menu. I added it myself in header.tpl:

<li><a href="http://italimporter.com/index.php?route=information/contact">Contact</a></li>

But I can't translate it in this case. So I want change this link, as it is the footer. Second column from the left, first link from above:

<li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>

I did it but auto-translate doesn't work, unlike in the footer.

I try to change or delete same link in vq2-catalog_view_theme_bigshop_template_common_header.tpl on line 237

But in this case I get the error:

"Notice: Undefined variable: text_contact in /home/italimpo/domains/italimporter.com/public_html/vqmod/vqcache/vq2-catalog_view_theme_bigshop_template_common_header.tpl on line 237"

So, how to make this link auto-translated? What is the right way to add this url in header.tpl?

Merkucio
  • 175
  • 1
  • 4
  • 19

3 Answers3

0

You have to add the following code to the following files

catalog/controller/common/header.php open above file and paste below line in index() function.

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

second edit the language file of header.php also.

siddhesh
  • 598
  • 6
  • 19
  • please change this line $this->data['text_contact'] = $this->language->get('text_contact'); – siddhesh Mar 02 '15 at 12:55
  • There is no such line in catalog/controller/common/header.php. I added your code here after $this->data['title'] = $this->document->getTitle(); I did it after a added
  • in catalog/view/theme/mytheme/template/common/header.php and get the white blank homepage. What did I do wrong? – Merkucio Mar 03 '15 at 04:07
  • whereever you will see $this->data['some_name'] = $this->language->get in index.php or if you don't understand copy and paste your header.php here – siddhesh Mar 03 '15 at 08:45
  • Thanks for your help. I resolved this issue with the code: $this->data['text_contact'] = $this->language->get('text_contact'); instead of your code ;) – Merkucio Mar 03 '15 at 09:34
  • If this answers helps you and solve your problem then click the tick sign below the answer which helps you to solve the problem and cloase your question – siddhesh Mar 03 '15 at 11:03