示例#1
0
        public ActionResult Index()
        {
            var categoryViewModel = new CategoryViewModel();

            UCommerce.EntitiesV2.Category currentUCommerceCategory = UCommerce.Runtime.SiteContext.Current.CatalogContext.CurrentCategory;

            categoryViewModel.Name        = currentUCommerceCategory.DisplayName();
            categoryViewModel.Description = currentUCommerceCategory.Description();
            categoryViewModel.Products    = MapProducts(UCommerce.Api.CatalogLibrary.GetProducts(currentUCommerceCategory));

            return(View("/views/category.cshtml", categoryViewModel));
        }
        public IList <UCommerce.Documents.Product> GetProductsFor(UCommerce.EntitiesV2.Category category, IList <Facet> facets)
        {
            List <UCommerce.Documents.Product> products = GetMockProducts();

            return(products);
        }
示例#3
0
 private CategoryViewModel MapCategory(UCommerce.EntitiesV2.Category category)
 {
     return(new CategoryViewModel()
     {
     });
 }
示例#4
0
        public ActionResult Index()
        {
            UCommerce.EntitiesV2.Category category = SiteContext.Current.CatalogContext.CurrentCategory;

            return(View(MapCategory(category)));
        }