P
P
Pavel2016-04-15 11:11:38
PHP
Pavel, 2016-04-15 11:11:38

How to make a variable from one controller available in another?

That's the whole question. There is Opencart 2.1.0.1 and there is such a thing that variables from some controllers are not available in others. Is there any easy way around this? without creating global variables?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DTX, 2016-04-15
@Palych_tw

libraries?
https://ellislab.com/codeigniter/user-guide/genera...
See examples in the system\library folder there. For example session.
Loaded in framework.php

// Library Autoload
if ($config->has('library_autoload')) {
  foreach ($config->get('library_autoload') as $value) {
    $loader->library($value);
  }
}

Set in default.php:
// Autoload Libraries
$_['library_autoload']     = array();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question