Page 1 of 1

New variable for multi language site

Posted: Tue Sep 25, 2012 3:52 am
by gerrymax
Hello,

I want to add a new value (variable) for my bilingual site (French / English)

I went in /catalog/language/english AND in /catalog/language/french to add in the file the new value I need. I gave it a new name.

Then I called the new value un my footer.tpl like this (I copied an existing one)

<h3><span><?phphecho $text_garantie; ?></span></h3>

My new value is Garantie....

But it gives an error as follows : Notice: Undefined variable: text_garantie in /home/h00103/domains/novostyl.com/public_html/OPENCART/catalog/view/theme/fashionstreet/template/common/footer.tpl on line 16

Where should I add it ? Elsewhere ? I have look in the database but could not find anything...

Thanks a lot for your answer !!! I appreciate it.

Re: New variable for multi language site

Posted: Tue Sep 25, 2012 5:35 am
by dirtboy
find this file catalog > controller > common > footer.php

find the this line of code

Code: Select all

$this->data['text_information'] = $this->language->get('text_information');
below it add this line of code

Code: Select all

$this->data['text_garantie'] = $this->language->get('text_garantie');
you are receiving the undefined error because OC doesn't know what the new text is until you tell it what it is. Honestly i am not sure if this code has to be someplace specific in the controller, if this does not work then find the line similar to the one above that is above the new line you are adding.

Re: New variable for multi language site

Posted: Wed Sep 26, 2012 1:00 am
by gerrymax
Thank you so much dirtboy !!

It works !

Have a great day :)