November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Tim,
If you want to find by the display name of product, then you can use SqlWhereClause instead of SqlMetaWhereClause.
I use following sample code and return 25 records:
private void testCatalogEntiresSearch()
{
CatalogSearchParameters parameters = new CatalogSearchParameters();
parameters.SqlWhereClause = "1=1 AND Name LIKE '%Canon%'";
CatalogSearchOptions options = new CatalogSearchOptions
{
RecordsToRetrieve = 50,
CacheResults = false,
StartingRecord = 0,
ReturnTotalCount = true
};
Entries result = CatalogContext.Current.FindItems(parameters, options, new CatalogEntryResponseGroup(CatalogEntryResponseGroup.ResponseGroup.CatalogEntryFull));
Response.Write(result.TotalResults);
}
Hope this helps,
/DL
Thanks a lot for you answer, we tried your solution and it worked out fine.
We did however (in some cases) go over to use none-commerce caching instead of the parameters CacheResults alternative shown above. This due to that we have higher performance needs some scenarios.
/Tim
Hi,
Is there a metadata for the displayprice? Or another way to obtain it using a sql query?
Regards
Hi,
I have been trying to find catalog entries that have a certain MetaField value set, e.g. a DisplayName that equals Canon. The example below is taken from:
http://sdk.episerver.com/commerce/1.1/Content/Developers%20Guide/Catalog%20System/Catalog%20Product%20Search.htm
private void testCatalogEntiresSearch()
I can retrieve a result by uncommenting the "parameters.SqlMetaWhereClause" and the "options.Classes.Add("Brands");", but the result returned is too big, and contains unnecessary data - i don’t want to
handle that amount of data on each request.
Does anyone of you guys know how to get this working?
/Tim