Hi Darius,

I think the root categories have the parentid set to "oxrootid", no?

So you should get the roots with:
$oRoots = oxNew("oxcategorylist");
$oRoots->selectString("select * from oxcategories where oxparentid = 'oxrootid' order by oxsort");
$rootArray = $oRoots->getArray();

if you want OXID objects... of course you can just use the select and build your own objects to save memory ;)

cheers,
Stefan

Darius Tumas schrieb:
Hello,

I'm writing simple module which will output xml list with all products and
variants in the shop.

Module is extending start class.

In first time i wanted to fetch all root products with SQL query.  SELECT
oxid FROM oxarticles WHERE oxparentid IS NULL; Interesting thing, that
always i got empty result. It seems that adodb dont want to work with "IS
NULL".

So then i decided to fetch all information i need by using oxid objects.

$cats = $this->_oCategoryTree; //as i mentioned with module i'm expanding
start object.

I can get article IDs in categories subcat with ??->getSubCats();

but how to get root category articles?

Respectfully,

Darius Tumas
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general


--
*******************************************
Stefan Moises
Senior Softwareentwickler

shoptimax GmbH Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-25
Fax:  0911/25566-29
[email protected]
http://www.shoptimax.de
*******************************************

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to