hagen22 Posted April 14, 2014 Share Posted April 14, 2014 Hello, I need to insert php code from category, and i'm trying: require './classes/Category.php'; ... $object = new Category(); ... $object->save(); But always have the same error: Fatal error: Class 'ObjectModel' not found in /var/www/prestashop/classes/Category.php on line 28 What can i do for create a instance of object class ? If i put a require for ObjectModel in Category.php i have the same error. Thanks. Link to comment Share on other sites More sharing options...
Orange35 Posted April 14, 2014 Share Posted April 14, 2014 Class ObjectModel extends ObjectModelCore, so you need them both. 1 Link to comment Share on other sites More sharing options...
hagen22 Posted April 14, 2014 Author Share Posted April 14, 2014 Class ObjectModel extends ObjectModelCore, so you need them both. ObjectModel.php only contains abstract class ObjectModelCore {} Link to comment Share on other sites More sharing options...
vekia Posted April 14, 2014 Share Posted April 14, 2014 let's clarify: where you're trying to use this code? is a part of php file - this is obvious but where? It's a part of module? or what? Link to comment Share on other sites More sharing options...
Recommended Posts