Again, I need to implement some very special product filtering in DW (Version 8.9.2.6).
Ecom Catalog modules contain Product Groups and Smart Searches, Im using ProductsAndGroupsHandler to get the Groups and Products for each area (6) so I can construct my filtering criteria.
I see there is a new property on ProductsAndGroupsHandler SearchesSelected. (See screenshot attached below). The question is how should I use this output to return the SmartSearch result?
The Code:
IEnumerable<Paragraph> areaModuleParagraphs = GetAreaModuleParagaraphs(areaId, "eCom_Catalog");
foreach (var paragraph in areaModuleParagraphs)
{
Properties properties = Dynamicweb.Base.GetParagraphModuleSettings(paragraph.ID);
ProductsAndGroupsHandler productGroupSelector = new ProductsAndGroupsHandler(properties["ProductAndGroupsSelector"]);
productGroupSelector.IncludeSubgroups = true;
if(productGroupSelector.SearchesSelected.Count() >0)
{
string[] sa = productGroupSelector.SearchesSelected.ToArray();
// what to do with sa?
}
foreach (var group in productGroupSelector.GroupsSelected)
{
Dynamicweb.eCommerce.Products.Group parent = new Dynamicweb.eCommerce.Products.Group();