Hi, You don't need to set every field manually.
Your code snippet works and creates new category. In your code i see only notice message (not a warning) ignored by oxid's error reporting settings. Alf. -----Original Message----- From: [email protected] on behalf of Cubris Zukilla Sent: Sun 2010-11-07 20:05 To: [email protected] Subject: [oxid-dev-general] Problem with oxid API Hi. I have this code in my import script: $ox_category = oxNew("oxcategory"); $ox_category->setId("ELKO_" . $category["categorycode"]); $ox_category->oxcategories__oxshopid = new oxField($this->oxid_shop_id); $ox_category->oxcategories__oxtitle = new oxField($category["categoryname"]); $ox_category->oxcategories__oxactive = new oxField(1); $ox_category->oxcategories__oxparentid = new oxField("oxrootid"); $ox_category->oxcategories__oxsort = new oxField(1); $ox_category->save(); On save() i get a number of warnings: Notice: Trying to get property of non-object in /opt/local/www/oxid/core/oxbase.php on line 1250 Do I really have to set every field manually?
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
