Try our conversational search powered by Generative AI!

Get CatalogNode from entry code (SKU)

Vote:
 

Is there a direct API that can give me the CatalogNode/CatalogNodes that product or variant belongs to? Just by passing the entry code or (sku)?

#143765
Jan 29, 2016 17:24
Vote:
 

Hi Sapna,

I *think* you'll want to take a look at the EPiServer.Commerce.Catalog.Linking namespace (http://world.episerver.com/documentation/Class-library/?documentId=commerce/8/551C57ED). There is a class called NodeRelation that may be what you're looking for. Here's is documentation surrounding it: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Commerce/8/Content/Categorizations/

#143767
Jan 29, 2016 19:06
Vote:
 

Hi,

There is no direct API:s to do that. You'll have to do it in two steps:

- First use ReferenceConverter to get the contentlink from the Code

- Secondly use ILinksRepository/IRelationRepository to get the NodeRelation for that content link - refer to Richley's post for more information.

Regards.

/Q

#143769
Jan 29, 2016 23:49
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.