Post by lenamtl » Thu Jan 10, 2013 5:26 am

Hi,

I'm using a VQMOD Customer Order Print and want to localized the Print button.

In the vqmod the line that added the button is:

Code: Select all

<![CDATA[<div class="right"><a href="javascript:printDiv('print');" class="button" />Print</a></div>]]>
I have added a new string in my main languages files :
\www\opencart\catalog\language\english\english.php
\www\opencart\catalog\language\french\french.php

Code: Select all

$_['button_print]          = 'Print';
So what should be the new line of code that will replace Print by the language string.


A quick solution for now is to use an icon instead of button but I like to know how to use the language variables correctly.

Thanks
Last edited by lenamtl on Fri Jan 11, 2013 12:31 am, edited 1 time in total.

New member

Posts

Joined
Thu Jun 30, 2011 9:10 am

Post by OSWorX » Thu Jan 10, 2013 6:26 am

In the corresponding controller assign the new language var to a variable e.g.:

Code: Select all

$this->data['button_print'] = $this->language->get('text_button_print');
And then in the template do it like (here inside the vqmod):

Code: Select all

<![CDATA[<div class="right"><a href="javascript:printDiv('print');" class="button" /><?php echo $button_print; ?></a></div>]]>

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by lenamtl » Fri Jan 11, 2013 12:36 am

It's working ok thanks :)

I have edited the the order.php file located in www\opencart\catalog\controller\account
Around line 226

New member

Posts

Joined
Thu Jun 30, 2011 9:10 am

Post by OSWorX » Fri Jan 11, 2013 12:54 am

lenamtl wrote:It's working ok thanks :)

I have edited the the order.php file located in www\opencart\catalog\controller\account
Around line 226
Forgot to mention: both lines of code can be done through vqmod (not only the second for the template).
But I am sure you did it that way ;D

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by lenamtl » Fri Jan 11, 2013 8:51 am

Yes, I have already put all code modifications in VQMOD to keep original code untouched.
VQMOD is fantastic!
Thanks

New member

Posts

Joined
Thu Jun 30, 2011 9:10 am
Who is online

Users browsing this forum: No registered users and 7 guests