Try our conversational search powered by Generative AI!

Issue in fetching catalogentries specific to a catalog

Vote:
 

Hi,

I am facing an issue with getting catalogentries under a catalog by using catalog code. I am getting all the catalog entries from other catalogs also if the catalog entry is mapped to multiple catalognodes.

private static Injected referenceConverter;

public static ReferenceConverter RefConverter
{
get { return referenceConverter.Service; }
}

var reference = RefConverter.GetContentLink(catalogcode);

IEnumerable currencySKUs = ContentLoader.GetChildren(reference).ToList();

This is returning me all the catalog entries related to other catalog also.

Please let me know what might be the issue

Thanks,

Manjeera T

#175517
Feb 22, 2017 13:01
Vote:
 

Hi,

what is catalogcode? Catalogs don't have codes, only categories (nodes) and entries do. What is the value of reference after the code has been resolved?

#175518
Feb 22, 2017 13:24
Vote:
 

Hi,

It is the catagorynode code which I am passing to the below code.

var reference = RefConverter.GetContentLink(catalogcode);

the reference value is something looking like this "1073741838__CatalogContent".

Once after executing the below code, I am getting catalogentries of other catalognodes also

IEnumerable<Currency> currencySKUs = ContentLoader.GetChildren<Currency>(reference).ToList();

Thanks,

Manjeera T

#175520
Feb 22, 2017 13:36
Vote:
 

That is very weird, you should only get entries that are linked to this particular category. If you look in the Catalog UI, does the list of entries you see for this category differ from what you get form the GetChildren call?

#175521
Feb 22, 2017 13:39
Vote:
 

Hi Magnus,

Yes the CatalogUI shows different set of entries.

Suppose a catalogg had 20 entries mapped to it. When I am calling GetChildren, it is getting around 60 entries along with entries of other catalogs.

Thanks,

Manjeera T

#175560
Feb 23, 2017 6:34
Vote:
 

What is the result of this query if you run it in the DB?

SELECT CatalogId, CatalogEntryId FROM NodeEntryRelation WHERE CatalogNodeId = 14

(14 is the unmasked node ID of the 1073741838 content ID)

#175564
Feb 23, 2017 8:57
Vote:
 

Hi Magnus,

Issue got resolved.

Thanks.

Thanks,

Manjeera T

#175569
Feb 23, 2017 9:33
* 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.