Answer the question
In order to leave comments, you need to log in
Why does OpenCart 3 swear at a custom module?
Good day to all. I need your help. I installed my module on opencart 3. It appeared in the admin panel and there is an opportunity to activate it. However, when you move on to editing opencart, you get an error in which only one of the files I added looms.
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'));
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question