Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
//this.Root = e commerce root ContentLinks = this.contentLoader.GetDescendents(this.Root), Languages = this.languageBranchRepository.ListEnabled() .Select(x => x.Culture)
Thanks for the code. Our cataloug has somethign silly like 10,000 items in it, so this api call would take a while I guessing? I will give it a test but prob need more somethign like CatalogEntrySearchCriteria although I have no idea how to use it to filter on product types :(
To filter on content types, you can specify the ClassType of the CatalogEntrySearchCriteria - as Khan's answer - something like:
criteria.ClassType.Add("product"); //variation/bundle/...
If you want to filter down to the metaclass, use this:
criteria.Add("_metaclass", new SimpleValue() { key = "_metaclass", value = <metaclass Name>});
Regards.
/Q
In the CMs i can use this bit of code to gett al lpages of a certain type:
var pageTypeId = contentTypeRepository()
.Load
.ID;
var criteriaCollection = new PropertyCriteriaCollection
{
new PropertyCriteria
{
Condition = CompareCondition.Equal,
Name = "PageTypeID",
Type = PropertyDataType.PageType,
Value = pageTypeId.ToString(),
Required = true
}
};
return pageCriteriaQueryService.FindPagesWithCriteria(
MetaDataRootType.PageLink,
criteriaCollection).Select(x => x as RoyaltySchemeType)
.ToReadOnlyList();
I want to be able to do the equivilant in commerce, so get all products that are of a certain type regardless of where they live int he tree... I'm guessing this is a simple one, how do I go about doign it?