Gday.
How come when I copy and paste $variable elements to another template file, it says the variable isn't defined? Is something dynamically setting and unset()ing them in a way to stop other template files from being able to access that data?
Basically, there are 3 files you need to look at -- the controller file, the language file and the template file.
The variable is declared in the controller and passed through to the template, while the value of the variable may come from the language file or extracted from the database.
Have a look in the controller file with the same name as the template file, you will find something like --
And in the associated language file --
Fido-X.
The variable is declared in the controller and passed through to the template, while the value of the variable may come from the language file or extracted from the database.
Have a look in the controller file with the same name as the template file, you will find something like --
Code: Select all
$this->data['variable_name'] = $this->language->get['variable_name'];
Code: Select all
$_['variable_name'] = 'Some value';
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Who is online
Users browsing this forum: No registered users and 93 guests