Post by SamTheDemon » Fri Apr 17, 2020 11:03 am

Hey I'm using Opencart 3.0.3.2 I have changed the theme of my checkout before a week and it was working perfectly till today I start getting this error
here is what i get in my page

Code: Select all

Fatal error: Uncaught Exception: Error: Could not load model affiliate/affiliate! in E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\system\storage\modification\system\engine\loader.php:89 Stack trace: #0 E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\catalog\controller\extension\d_quickcheckout\confirm.php(376): Loader->model('affiliate/affil...') #1 E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\system\storage\modification\system\engine\action.php(79): ControllerExtensionDQuickcheckoutConfirm->updateOrder(Array) #2 E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\system\storage\modification\system\engine\loader.php(48): Action->execute(Object(Registry), Array) #3 E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\catalog\controller\extension\module\d_quickcheckout.php(387): Loader->controller('extension/d_qui...') #4 E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\catalog\controller\extension\module\d_quickcheckout.php(47): ControllerExtensionModuleDQuickcheckout->initialize() #5 E:\xampp\htd in E:\xampp\htdocs\opencart\opencart-3.0.3.2 (2)\upload\system\storage\modification\system\engine\loader.php on line 89

here's what in the loader file ( i don't know why but its throws an exception which is line 89 ):

Code: Select all

public function model($route) {
		// Sanitize the call
		$route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route);
		
		if (!$this->registry->has('model_' . str_replace('/', '_', $route))) {
			$file  = DIR_APPLICATION . 'model/' . $route . '.php';
			$class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $route);
			
			if (is_file($file)) {
				include_once(modification($file));
	
				$proxy = new Proxy();
				
				// Overriding models is a little harder so we have to use PHP's magic methods
				// In future version we can use runkit
				foreach (get_class_methods($class) as $method) {
					$proxy->{$method} = $this->callback($this->registry, $route . '/' . $method);
				}
				
				$this->registry->set('model_' . str_replace('/', '_', (string)$route), $proxy);
			} else {
				throw new \Exception('Error: Could not load model ' . $route . '!');
			}
		}
	}
	

Attachments

SharedScreenshot.jpg

here my code - SharedScreenshot.jpg (141.4 KiB) Viewed 1310 times

Last edited by straightlight on Fri Apr 17, 2020 11:11 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Apr 07, 2020 8:11 pm

Post by xxvirusxx » Fri Apr 17, 2020 5:47 pm

SamTheDemon wrote:
Fri Apr 17, 2020 11:03 am
Could not load model affiliate/affiliate
There is no admin/model/affiliate/affiliate.php or catalog/model/affiliate/affiliate.php on 3.0.3.2.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by paulfeakins » Fri Apr 17, 2020 6:03 pm

SamTheDemon wrote:
Fri Apr 17, 2020 11:03 am
Hey I'm using Opencart 3.0.3.2 I have changed the theme of my checkout before a week and it was working perfectly till today
Probably because you only cleared the cache today so the errors from the theme are only showing now?

Either way, contact the theme developer.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Voltagescot » Thu Jan 14, 2021 2:19 pm

Did you get a fix for this?

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am
Who is online

Users browsing this forum: Bing [Bot] and 578 guests