Post by dzamanakos » Sat Mar 31, 2018 12:47 am

Hi, i'm new to how opencart works and i have a question.
In OC 2.0.31 i had a vqmod that made a custom menu.
The vqmod was in the form of :

Code: Select all

<file name="catalog/view/theme/journal2/template/journal2/headers/default.tpl">
                        <search position="after" offset="29"><![CDATA[<?php echo $this->journal2->settings->get('config_secondary_menu'); ?>]]></search>

		$my_data['categories'] = array();
		$categories = $this->model_catalog_category->getCategories(106);	
after there was some code with foreach and html to make custom styling to the menu...
and finally i did a echo $my_menu at the end of the code...

after updating to OC i have some php errors in this code, as i understand i cant use $this->load->language('module/category'); etc inside the tpl files anymore (i got errors of Uncaught Error: Call to a member function language() on null etc).

I'm thinking of moving the code to a controller file and just echo $my_menu to the template file, but i cant file which controller file will send this variable to the template.
I've tried for example to print_r the $data variable from catalog/controller/common/header.php to the template but the var is empty.

Do i have to move the code to a controller file, or there is another way to read this data in the template file? If i have to use a controller file which one is it?

best regards,



Tue Feb 24, 2015 5:59 am

Post by IP_CAM » Sat Mar 31, 2018 11:32 pm

Well, you are using a paid CUSTOM Theme, and this Theme uses Custom Files,
like the /headers/default.tpl, you therefore have to get in touch with
those, creating this theme, or creating the VqMod, to get some help, I assume.
But THIS Code still exists in later V-2 Versions as well, just to have it mentioned.
Just check the controller/product/category.php file, to find out about.

Code: Select all


Please don't send me OC Forum Personal Messages, just contact:
OC LIGHT Test Site:
OC V-PRO Test Site:
My Github OC Site:
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.

User avatar
Legendary Member


Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 5 guests