Post by coolpenguin » Mon Jan 16, 2012 2:57 am

Hello everyone,

Recently I started learning how to really get the most out of opencart, that means I am trying to understand php, css and html. I have a question about php aou guys and I hope you guys can help me get this knowledge.

Lets say in a template file this line is standing:

<h3><?php echo $text_information; ?></h3>

If I change the line to:

<h3><?php echo $text_frogs; ?></h3>

Why do I get an error if i create the following line in the right language file:

$_['text_frogs'] = 'frogs';

What do I do need to do to make it actually display text instead of an error? Has it something to do with a controller file?

Thanks in advance! :joker:

My fantasy miniature parts shop: www.warhammerbits.nl. I would appreciate feedback. ;)


New member

Posts

Joined
Tue Jul 26, 2011 8:40 pm

Post by grgr » Mon Jan 16, 2012 4:04 am

Controller gets the text from the language file and passes it to the template.

So you need to add:

Code: Select all

$this->data['text_frog'] = $this->language->get('text_frog');
to the relevant controller.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by straightlight » Mon Jan 16, 2012 4:15 am

Make sure to integrate all relevant text parameters from VQMod and not straight from the core's controller.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coolpenguin » Mon Jan 16, 2012 5:04 am

straightlight wrote:Make sure to integrate all relevant text parameters from VQMod and not straight from the core's controller.
Is VQMod essential to learn and is it hard? ???

My fantasy miniature parts shop: www.warhammerbits.nl. I would appreciate feedback. ;)


New member

Posts

Joined
Tue Jul 26, 2011 8:40 pm

Post by straightlight » Mon Jan 16, 2012 5:32 am

It is essential for most of OC users as this is what they seem to use amongst their store to avoid core files corruption. It is also very easy after a while. The official VQMod v2.0 is located here: http://forum.opencart.com/viewtopic.php?f=23&t=40987

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Amazon [Bot] and 20 guests