Is there anyway to determine wheter a catalog node or product is original or link in the catalog structure?
Let us say that I drag a node to a different place in the structure. I then get a question to dublicate, move or link the node to the new place. Let's say I choose link.Later I do parentNode.GetChildren() to get all the nodes and here I only what the node that are not linked in, only nodes where this is their original position.
Is there anyway I can do this?
Each catalog content's ParentLink always refers to the home location. So if you do GetChildren for ContentReference x, the returned items which have ParentLink equal to X will be the items which have the category as home location. The linked items will have a different ParentLink.
Perfect, thanks Magnus!
Currently there is no easy way to do this, the possible but not performant way is to load the children and check if their ParentLink is same as parentNode.ContentLink.
We are working on improving this in Commerce 11.
Quan, it would be great with a GetDescendants with an option "excludeLinkedItems" or something like that. Looking forward to 11!