Post by tomd » Thu Nov 06, 2014 3:54 am

Hi... I have a clean install of Opencart 2.0. I installed a theme and now the homepage is blank. The error log says:

PHP Notice: Error: Could not load model /public_html/myshop/catalog/model/setting/extension.php! in /public_html/myshop/system/engine/loader.php on line 24

On checking, in OC2.0 extension.php does not exists in catalog/model/setting/ but it has a new extension folder which contains the php file catalog/model/extension/extension.php

The code in loader which seems to be the culprit is:

Code: Select all

public function model($model) {
		$file = DIR_APPLICATION . 'model/' . $model . '.php';
		$class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model);

		if (file_exists($file)) {
			include_once($file);

			$this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry));
		} else {
			trigger_error('Error: Could not load model ' . $file . '!');
			exit();
		}
I am not sure how to fix this as I am very new to PHP and OC. Can someone please help me resolve this issue. I would greatly appreciate it.

There is also another error:
PHP Notice: Undefined variable: text_edit in /public_html/myshop/admin/view/template/setting/setting.tpl on line 29

Edit: I fixed the text_edit error by following the fix in this post:
http://forum.opencart.com/viewtopic.php ... it#p520305
Thanks,
Tom
Last edited by tomd on Thu Nov 06, 2014 5:43 am, edited 1 time in total.

New member

Posts

Joined
Tue Mar 05, 2013 5:17 am

Post by tomd » Thu Nov 06, 2014 5:39 am

Hi All,

Just FYI, I resolved this issue. The theme I was using mentioned that it was OC 2.0 compatible but it had a bug. It was looking for the extension.php in the catalog/model/settings/ folder (which is true in the earlier versions of OC) but in OC2.0 the extension.php is in catalog/model/extension/ folder.

Found this:

Code: Select all

$this->load->model('settings/extension');
		$extensions = $this->model_settings_extension->getExtensions('module');

and changed it to:

Code: Select all

$this->load->model('extension/extension');
		$extensions = $this->model_extension_extension->getExtensions('module');
I felt helpless as there was zero support from the paid theme maker.

Thanks,
Tom

New member

Posts

Joined
Tue Mar 05, 2013 5:17 am

Post by budgetneon » Thu Nov 06, 2014 7:13 am

I felt helpless as there was zero support from the paid theme maker.
The type of error you're describing would mean that the theme developer hasn't even tried their theme once on OC 2.x. This isn't some subtle corner case.

That likely means you're just seeing the tip of the iceberg. Probably more issues to come. Try the checkout path and see how that goes.

I would find a new theme developer that at least does cursory testing.

New member

Posts

Joined
Sat Sep 20, 2014 11:32 pm


Post by tomd » Fri Nov 07, 2014 12:39 am

Hi budgetneon,

You are absolutely correct. I purchased this expensive theme from a popular theme site. There are more and more similar problems cropping up. I have requested for a refund.

I have one question:
I have some other customized extensions which are currently being upgraded to be compatible to OC 2.0. What would be the best approach, should I first install these extensions and then the themes or the theme should go on first.

Any insight is much appreciated.

Thanks,
Tom

New member

Posts

Joined
Tue Mar 05, 2013 5:17 am

Post by MikaelSampoerna » Fri Feb 06, 2015 5:29 pm

tomd wrote:Found this:

Code: Select all

$this->load->model('settings/extension');
		$extensions = $this->model_settings_extension->getExtensions('module');

and changed it to:

Code: Select all

$this->load->model('extension/extension');
		$extensions = $this->model_extension_extension->getExtensions('module');
Hi Tom,

Which file I need to change to solve this issue?

Many thanks ;D


Posts

Joined
Sun Nov 23, 2014 10:58 pm

Post by juliocc » Tue Sep 01, 2015 6:30 pm

Hello, I am having this same issue and don't know in which file I have to make the corrections. Can someone help me please?

Thanks in advance

Screen capture: http://puu.sh/jW6dH/64ac99e254.png

some additional info:

- No theme installed, it's default opencart
- This happens only when I add a discount coupon for the checkout, on the payment method selection

Newbie

Posts

Joined
Fri Jan 30, 2015 8:50 am

Post by limitlessisa » Wed Sep 02, 2015 12:02 am

For 2.0.2
catalog/model/extension/extension.php copy folder to catalog/model/settings/

and catalog/model/settings/extension.php edit :
BEFORE:

Code: Select all

class ModelExtensionExtension extends Model {
	function getExtensions($type) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "'");

		return $query->rows;
	}
}
AFTER:

Code: Select all

class ModelSettingExtension extends Model {
	function getExtensions($type) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "'");

		return $query->rows;
	}
}

Newbie

Posts

Joined
Tue Sep 01, 2015 11:52 pm

Post by juliocc » Wed Sep 09, 2015 6:34 pm

That did it, problem is solved. Thank you very much for your assistance sir! ;D

Newbie

Posts

Joined
Fri Jan 30, 2015 8:50 am

Post by tieulong143 » Mon Dec 07, 2015 4:05 pm

limitlessisa wrote:For 2.0.2
catalog/model/extension/extension.php copy folder to catalog/model/settings/

and catalog/model/settings/extension.php edit :
BEFORE:

Code: Select all

class ModelExtensionExtension extends Model {
	function getExtensions($type) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "'");

		return $query->rows;
	}
}
AFTER:

Code: Select all

class ModelSettingExtension extends Model {
	function getExtensions($type) {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "'");

		return $query->rows;
	}
}
"limitless isa" strictly speaking you need to install OS 2.2. Thank limitlessisa

Newbie

Posts

Joined
Sun Dec 06, 2015 5:55 pm

Post by selfmadebracelets » Fri May 13, 2016 6:16 am

OPENCART 2.0

Get error : admin/model/extension/module.php! in myshop/public_html/system/engine/loader.php on line 24 when i try to open the module in admin panel. Have tried to find a solution but don't find it.

Can somebody help me? i'm not using the default template.

Thanks in advance.

best regards

Yoshi


Posts

Joined
Fri May 13, 2016 6:14 am

Post by selfmadebracelets » Fri May 13, 2016 7:04 pm

Hi everybody,

Can somebody help me? I can't fix this error :

Could not load model /public_html/admin/model/extension/module.php! in public_html/system/engine/loader.php on line 24.

But i'm using the default theme. I've tried to contact the theme deloveper but they can't help me. Maybe somebody also use theme ''Megashop'' from scharles202?

http://www.opencart.com/index.php?route ... =37&page=3

Thanks in advance,

Yoshi


Posts

Joined
Fri May 13, 2016 6:14 am
Who is online

Users browsing this forum: No registered users and 14 guests