Try our conversational search powered by Generative AI!

Determine wheter a catalog node/product is original or link in catalog structure



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?



Mar 29, 2017 12:30

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.

Mar 29, 2017 13:32

Perfect, thanks Magnus!

Mar 29, 2017 13:34


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.


Mar 29, 2017 13:35

Quan, it would be great with a GetDescendants with an option "excludeLinkedItems" or something like that. Looking forward to 11!

Edited, Mar 29, 2017 13:38
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.