4

I need programmatically import catalog from 3rd party service to Sitecore Commerce 9. I can create Catalog, Category and SellableItem. I can add related product for SellableItem, but I couldn't get a list of already added related products for my SellableItem.

How can I get list of related products for SellableItem?

1 Answer 1

4

Retrieve related products for 6042069 sellable item:

var id = "relatedproduct-6042069";
var findResult = this._findEntitiesInListPipeline.Run(new FindEntitiesInListArgument(typeof(Sitecore.Commerce.Plugin.Catalog.SellableItem), id, 0, 100), context.ContextOptions).Result;
var result = findResult.List.Items;

Where _findEntitiesInListPipeline is IFindEntitiesInListPipeline

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.