Page 1 of 1

Can't Access Outside From Custom Module

Posted: Wed Oct 18, 2017 4:29 pm
by mertdogan
I want to create a custom module for database product export for my private needs.

When i use

Code: Select all

$this->db->.... 
in a model function, it generates Error 500 with this error log:

Code: Select all

[18-Oct-2017 07:57:40 UTC] PHP Fatal error:  Call to a member function get() on null in /home/ekonim/public_html/system/engine/model.php on line 21
I moved this code to the controller, it runs without error. But when i want to access another model like:

Code: Select all

$this->load->model('tool/image');
$this->model_tool_image->resize($imgurl, 500, 500);
it generates again same error log.

How can i solve this problem?

Re: Can't Access Outside From Custom Module

Posted: Tue Nov 14, 2017 4:51 am
by straightlight
- Opencart version?
- Could you provide a sample of your custom module so to see in details what you are trying to achieve with the database?