add category programmatically prestashop
问题 I would like to add categories programmatically to prestashop, i tried this code $object = new Category(); $object->name = "xcvxvvx"; if (!$parent_id){ $parent_id = Configuration::get('PS_HOME_CATEGORY'); } $object->id_parent = $parent_id; $object->link_rewrite = array((int)(Configuration::get('PS_LANG_DEFAULT')) => $category); $object->add(); $object->id_category = $object->id; $object->id_category_default = $object->id; $object->update(); I get this error message : Fatal error: Uncaught