Example #1
0
        private ArrayList GetFeaturedProducts(int categoryID, ArrayList products)
        {
            CategoryController categoryController = new CategoryController();
            ProductController productController = new ProductController();

            CategoryInfo category = categoryController.GetCategory(categoryID);

            foreach (ProductInfo product in productController.GetFeaturedProducts(categoryID, false))
            {
                products.Add(product);
            }

            foreach (CategoryInfo childCategory in categoryController.GetCategories(PortalId, false, categoryID))
            {
                if (childCategory.CategoryID != Null.NullInteger)
                {
                    GetFeaturedProducts(childCategory.CategoryID, products);
                }
            }

            return products;
        }