Есть модуль персонализированые шаблоны от halfhope, последняя версия под 2.2.
Пытаюсь его адаптировать под 2.3.
изменил пути к модулю как описывал в других топках Chukcha
в настройках модуля прописал путь к файлу где лежит новый темплейт и проверил видит ли его модуль.
модуль сохраняеться и открываеться, но на фронте вылетает ошибка.
Notice: Error: Could not load template C:/OpenServer/domains/cmsdemo.com/catalog/view/theme/default/template/productcategory2.tpl! in C:\OpenServer\domains\cmsdemo.com\system\storage\modification\system\library\template\php.php on line 23
По ошибке видно что нету обратного слеш между productcategory2.tpl
Вот кусок кода откуда и появляетсья ета ссылка.
$template = 'product/category';
// Custom template module
$this->load->model('setting/setting');
$custom_template_module = $this->model_setting_setting->getSetting('custom_template_module');
$customer_group_id = $this->customer->getGroupId();
if ($this->config->get('config_theme') == 'theme_default') {
$directory = $this->config->get('theme_default_directory');
} else {
$directory = $this->config->get('config_theme');
}
if(!empty($custom_template_module['custom_template_module'])){
foreach ($custom_template_module['custom_template_module'] as $key => $module) {
if (($module['type'] == 0) && !empty($module['categories'])) {
if ((isset($module['customer_groups']) && in_array($customer_group_id, $module['customer_groups'])) || !isset($module['customer_groups']) || empty($module['customer_groups'])){
if (in_array($category_id, $module['categories'])) {
if (file_exists(DIR_TEMPLATE . $directory . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $module['template_name'] . '.tpl')) {
$template = $module['template_name'];
}
}
} // customer groups
}
}
}
$this->response->setOutput($this->load->view($template, $data));
// Custom template module
Когда я добавляю слеш гдето в етой строке,
if (file_exists(DIR_TEMPLATE . $directory . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $module['template_name'] . '.tpl'
ошибка исчезает, но не подгружает кастомный темплейт, а дефолтный.