Hi,
I want to retieve all products from a category including the products
variants in a single dataset, however when I set the CatalogClassTypes to
AllClassTypesClass the variants are not returned.
I have performed a trace on the stored procedure calls and the i_ClassType
property defaults to 12, however when I change this to 63 (All Class
Types)
and execure in query analyser I get the variants included on the dataset.
Here's the code
CategoryConfiguration categoryConfiguration = new CategoryConfiguration();
categoryConfiguration.LoadChildProducts = true;
categoryConfiguration.ChildProducts.SearchOptions = new
CatalogSearchOptions();
categoryConfiguration.ChildProducts.SearchOptions.PropertiesToReturn =
Helpers.GetDefaultProductPropertiesToReturn();
categoryConfiguration.ChildProducts.SqlWhereClause =
Helpers.GetDefaultSqlWhereClause();
categoryConfiguration.ChildProducts.SearchOptions.ClassTypes =
CatalogClassTypes.AllClassTypesClass;
categoryConfiguration.InventoryOptions =
Helpers.GetDefaultInventoryOptions();
try
{
//Attempt to get the Category's child products
products = CatalogHelper.GetCatalog().GetCategory(categoryName,
categoryConfiguration).ChildProducts.DataSet;
}
catch (Exception ex)
{
bool rethrow = ExceptionPolicy.HandleException(ex,
"BasePlatformPolicy");
if (rethrow)
throw;
}
Can anyone enlighten me as to why I cant get all class types out in a
single
call.
Thanks
Nick