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?
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
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?
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
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)
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