| Linux hosting5.siteguarding.com 3.10.0-962.3.2.lve1.5.88.el7.x86_64 #1 SMP Fri Sep 26 14:06:42 UTC 2025 x86_64 Path : /home/devsafetybis/op3038.dev.safetybis.com/catalog/controller/event/ |
| Current File : /home/devsafetybis/op3038.dev.safetybis.com/catalog/controller/event/theme.php |
<?php
class ControllerEventTheme extends Controller {
public function index(&$route, &$args, &$code) {
if (!$this->config->get('theme_' . $this->config->get('config_theme') . '_status')) {
exit('Error: A theme has not been assigned to this store!');
}
// If the default theme is selected we need to know which directory its pointing to
if ($this->config->get('config_theme') == 'default') {
$directory = $this->config->get('theme_default_directory');
} else {
$directory = $this->config->get('config_theme');
}
if ($directory != 'default' && is_file(DIR_TEMPLATE . $directory . '/template/' . $route . '.twig')) {
$this->config->set('template_directory', $directory . '/template/');
} elseif (is_file(DIR_TEMPLATE . 'default/template/' . $route . '.twig')) {
$this->config->set('template_directory', 'default/template/');
}
// If there is a theme override we should get it
$this->load->model('design/theme');
$theme_info = $this->model_design_theme->getTheme($route, $directory);
if ($theme_info) {
$code = html_entity_decode($theme_info['code'], ENT_QUOTES, 'UTF-8');
}
}
}