Get Parent Id from catalog
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 26
- Joined: 22 Jun 2015, 09:12
Get Parent Id from catalog
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!
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
The catalog items don't link to their parents and you can traverse them only downwards.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?
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