Search returning products only.
I have search functionality to return products based on a user's search parameter. The results are returning products and variants, but I only want the products returned. I thought that setting the CatalogClassType as ProductClass would filter out the variants but it doesn't seem to be working. Can somebody point me in the right direction? Thank you.
CatalogSearchOptions searchOptions =newCatalogSearchOptions();searchOptions.PropertiesToReturn =
"CatalogName, ProductId, DisplayName";searchOptions.ClassTypes =
CatalogClassTypes.ProductClass;CatalogSearch catalogSearch =CommerceContext.Current.CatalogSystem.GetCatalogSearch();
catalogSearch.CatalogNames ="Default";
catalogSearch.SqlWhereClause =string.Format("DisplayName LIKE '%{0}%'", searchParameter);

