@Yura07

Почему OpenCart 3 ругается на кастомный модуль?

Всем доброго времени суток. Нужна Ваша помощь. Установил свой модуль на опенкарт 3. В админке он появился и есть возможность его активировать. Однако когда переходишь к редактированию опенкарт выругивается ошибкой, в которой из добавленных мною файлов маячит лишь один.

Fatal error: Uncaught exception 'Exception' with message 'Error: Could not load model extension/module!' in E:\OSPanel\domains\opencart.loc\system\storage\modification\system\engine\loader.php:60
Stack trace:
#0 E:\OSPanel\domains\opencart.loc\admin\controller\extension\module\<b>vantage.php</b>(16): Loader->model('extension/modul...') 
#1 [internal function]: ControllerExtensionModuleVantage->index() 
#2 E:\OSPanel\domains\opencart.loc\system\storage\modification\system\engine\action.php(51): call_user_func_array(Array, Array) 
#3 E:\OSPanel\domains\opencart.loc\admin\controller\startup\router.php(26): Action->execute(Object(Registry), Array) 
#4 [internal function]: ControllerStartupRouter->index() 
#5 E:\OSPanel\domains\opencart.loc\system\storage\modification\system\engine\action.php(51): call_user_func_array(Array, Array) 
#6 E:\OSPanel\domains\opencart.loc\system\engine\router.php(34): Action->execute(Object(Registry)) 
#7 E:\OSPanel\domains\opencart.loc\system\engine\router.php(29): Router->execute(Object(Action)) #8 E:\OSPanel\ in E:\OSPanel\domains\opencart.loc\system\storage\modification\system\engine\loader.php on line 60


Часть кода:
<?php

class ControllerExtensionModuleVantage extends Controller {
	
	private $error = array(); 
	
	public function index() {   

		//Load language file
		$this->load->language('extension/module/vantage');

		//Set title from language file
		$this->document->setTitle($this->language->get('heading_title'));
		
		//Load settings model
		$this->load->model('extension/module');
		
		//Save settings
		if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
			if (!isset($this->request->get['module_id'])) {
				$this->model_extension_module->addModule('vantage', $this->request->post);
			} else {
				$this->model_extension_module->editModule($this->request->get['module_id'], $this->request->post);
			}
			$this->session->data['success'] = $this->language->get('text_success');
			$this->response->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));
		}
  • Вопрос задан
  • 3129 просмотров
Пригласить эксперта
Ответы на вопрос 1
zoozag
@zoozag
Opencart
$this->load->model('extension/module');

Неправильная ссылка на модель. Скорее всего должно быть:
$this->load->model('extension/module/vantage'); Ну или где у вас файл с моделью лежит проверьте
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы