Jump to content

Error Importing Categories


Recommended Posts

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 exist
at 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

 

Link to comment
Share on other sites

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

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 by vendetta V (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...