Post by afosh » Mon Jun 04, 2018 3:02 am

Greetings,
am using opencart3.0.2
when i uploaded the theme folders to the store through FTP, and replaced the old files, i came with an error

Fatal error: Call to a member function get() on string in /home/panda/public_html/oc/system/library/template.php on line 21

this is my template.php code

Code: Select all

<?php
class Template {
	private $adaptor;

  	public function __construct($adaptor) {
	    $class = 'Template\\' . $adaptor;
		
		if (class_exists($class)) {
			$this->adaptor = new $class();
		} else {
			throw new \Exception('Error: Could not load template adaptor ' . $adaptor . '!');
		}
	}

	public function set($key, $value) {
		$this->adaptor->set($key, $value);
	}

	public function render($template, $registry, $cache = false) {
		$this->adaptor->set('registry', $registry);
		$template_name = $registry->get('config')->get('theme_' . $registry->get('config')->get('config_theme') . '_directory');
		return $this->adaptor->render($template, false, $template_name);
	}
}
any helps?
the theme is a free theme called Merrity
Thanks inadvance

Newbie

Posts

Joined
Mon May 21, 2018 5:19 am

Post by xxvirusxx » Mon Jun 04, 2018 4:15 pm

Delete all folders from ocartdata/storage/modification, then login to admin and change theme to merrity.

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO
Who is online

Users browsing this forum: No registered users and 24 guests