Post by kosbou » Wed Nov 11, 2020 1:18 am

I want to use $stock text (availability) from product page in all pages. How can I do this??

OC 2.0.3.1 with journal theme

Newbie

Posts

Joined
Wed Mar 23, 2016 1:34 am

Post by straightlight » Wed Nov 11, 2020 1:26 am

kosbou wrote:
Wed Nov 11, 2020 1:18 am
I want to use $stock text (availability) from product page in all pages. How can I do this??

OC 2.0.3.1 with journal theme
Unsupported.

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 kosbou » Wed Nov 11, 2020 1:30 am

I try to add text to language file. How to get the new custom text in controller??? I tried the ways from prior posts with no luck.
Last edited by kosbou on Wed Nov 11, 2020 1:33 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Mar 23, 2016 1:34 am

Post by straightlight » Wed Nov 11, 2020 1:32 am

kosbou wrote:
Wed Nov 11, 2020 1:30 am
I try to add text to language file. How to get the new custom text in controller???
By using Events. catalog/language/<your_language>/the_folder .

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 kosbou » Wed Nov 11, 2020 1:33 am

Could you please give me an event example??

Newbie

Posts

Joined
Wed Mar 23, 2016 1:34 am

Post by straightlight » Wed Nov 11, 2020 1:37 am


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 kosbou » Wed Nov 11, 2020 1:52 am

ok
I add in the catalog/language/english/product/search.php

$_['text_new'] = 'new text';

in catalog/view/theme/*/template/product/search.tpl I use

echo '<div class="p-brand" style="font-size:small;"><b style="color:red">'.$text_new.date_format($then, 'd-m-Y').'</b></div>';

but I receive nothing. $then is displayed fine.

where am I wrong?

Newbie

Posts

Joined
Wed Mar 23, 2016 1:34 am

Post by straightlight » Wed Nov 11, 2020 1:57 am

You also need to add your $data['text_new'] in the search 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 kosbou » Wed Nov 11, 2020 2:01 am

this is my code for catalog/controller/product/search.php

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

nothing happens

Where I must put it in the file?

Newbie

Posts

Joined
Wed Mar 23, 2016 1:34 am

Post by straightlight » Wed Nov 11, 2020 2:17 am

kosbou wrote:
Wed Nov 11, 2020 2:01 am
this is my code for catalog/controller/product/search.php

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

nothing happens

Where I must put it in the file?
In the index() method and must be below the $this->load->language call.

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 kosbou » Wed Nov 11, 2020 2:20 am

I cannot understand. I have them as you suggested but nothing. Is there any conflict with journal?

Newbie

Posts

Joined
Wed Mar 23, 2016 1:34 am

Post by straightlight » Wed Nov 11, 2020 2:42 am

kosbou wrote:
Wed Nov 11, 2020 2:20 am
I cannot understand. I have them as you suggested but nothing. Is there any conflict with journal?
Yes. Which is why we don't support it on Opencart.com . Contact Journal Support for further assistance on this.

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 4 guests