Jump to content

Help with class "Context" in 1.6.1.0 - not found in script


Recommended Posts

Hello,

 

I have a write script for xml import product from supplier and work fine under 1.6.0.x version with class. I wanted to use a script for this new version 1.6.1.0 and now I get this error "Fatal error: Class 'Context' not found in /srv/www/example.com/public/www/init.php on line 21.

 

This is sample of script code:

$presto_init = array("ObjectModel", "webservice/WebserviceRequest", "Tools", "shop/Shop", "db/Db", "db/DbPDO", "Context", "Configuration");
	
	

	require_once('config/alias.php');
	require_once('config/defines.inc.php');
	require_once('config/settings.inc.php');
	include('init.php');
	

	ini_set('display_errors', 'on');
	error_reporting(E_ALL | E_STRICT);
	
	class Worker {
		public static function loadPrestaShopClass($path) {
			require_once("classes/".$path.".php");
			$file = explode("/", $path);
			$class = end($file);
			class_alias($class."Core", $class);

			return $class;
		}
}

Does anyone know, what Prestashop change in this version and how to change it to work?

 

Thank you for your reply.

Regards

Shaft

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...