Page 1 of 1

Get Parent Id from catalog

Posted: 22 Jun 2015, 09:16
by Bananamoon
Hello,

I am trying to get the Parent item from a Catalog item through the parentid, however there doesn't seem to be a getParentId function available. I also tried with other functions (like searchItems) with no success whatsoever.

Is there any way I am missing to get this parentid/item?
Thanks for the help!

Re: Get Parent Id from catalog

Posted: 22 Jun 2015, 09:28
by aimeos
Bananamoon wrote: I am trying to get the Parent item from a Catalog item through the parentid, however there doesn't seem to be a getParentId function available. I also tried with other functions (like searchItems) with no success whatsoever.

Is there any way I am missing to get this parentid/item?
The catalog items don't link to their parents and you can traverse them only downwards.

If you want to retrieve all parents of a node up to the tree root, you can use the getPath() method of the catalog manager:
https://github.com/aimeos/arcavias-core ... t.php#L437