vendetta V Posted January 15, 2016 Share Posted January 15, 2016 I want to import categories but want to put the parent category id and not the name, then I get the error below. I would also occur in importing the same products. [PrestaShopException]Parent category does not existat line 385 in file classes/Category.php 380. if (!$this->id_parent)381. return 0;382. 383. $parent_category = new Category((int)$this->id_parent);384. if (!Validate::isLoadedObject($parent_category))385. throw new PrestaShopException('Parent category does not exist');386. return $parent_category->level_depth + 1;387. }388. 389. /**390. * Re-calculate the values of all branches of the nested tree CategoryCore->calcLevelDepth - [line 150 - classes/Category.php] CategoryCore->add - [line 1254 - controllers/admin/AdminImportController.php] AdminImportControllerCore->categoryImport - [line 3457 - controllers/admin/AdminImportController.php] AdminImportControllerCore->postProcess - [line 171 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin546fuzfnw/index.php] Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2016 Share Posted January 15, 2016 isLoadedObject requires an object, what are you feeding it? classes/Validate.php line 712: /** * Check object validity * * @param object $object Object to validate * @return bool Validity is ok or not */ public static function isLoadedObject($object) { return is_object($object) && $object->id; } Link to comment Share on other sites More sharing options...
vendetta V Posted January 18, 2016 Author Share Posted January 18, 2016 (edited) isLoadedObject requires an object, what are you feeding it? classes/Validate.php line 712: /** * Check object validity * * @param object $object Object to validate * @return bool Validity is ok or not */ public static function isLoadedObject($object) { return is_object($object) && $object->id; } I'm getting in the parent category id of the parent category, not the name of the parent category. prestashop accept this parent_category--- ID-- name HOME---- 100---- INICIO INICIO--- 110--- CHASIS but I want to accept this, forcing ids parent_category -ID- name 2---- 100----- INICIO 100---- 110--- CHASIS Edited January 18, 2016 by vendetta V (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now