public ActionResult Wishlist() { var Categories = ApiUtil.GetCategoryList().Result; var objects = ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>(); objects.Add("SearchCategories", Categories ?? new List <Category>()); ViewBag.Data = objects; return(View()); }
public ActionResult ProductDetail(Guid Oid) { var objects = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>(); var product = ApiUtil.GetProduct(Oid).Result; var categories = ApiUtil.GetCategoryList().Result; objects.Add("SearchCategories", categories ?? new List <Category>()); ViewBag.Data = objects; return(View(product)); }
public IActionResult Index(string searchProduct) { var objects = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>(); var categories = ApiUtil.GetCategoryList().Result; //var product = ApiUtil.Search(searchProduct).Result; objects.Add("SearchCategories", categories ?? new List <Category>()); //objects.Add("Products", product ?? new List<Product>()); ViewBag.Data = objects; return(View()); }
public ActionResult CategoryResult(Guid id) { var objects = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>(); var categories = ApiUtil.GetCategoryList().Result; objects.Add("SearchCategories", categories ?? new List <Category>()); ViewBag.Data = objects; var productList = ApiUtil.GetProductByCategory(id).Result; if (productList == null) { return(RedirectToAction("Index", "Home")); } return(View(new CategoryResultVM() { ProductList = productList, Category = categories.FirstOrDefault(x => x.Oid == id) })); }
public ActionResult Index() { var objects = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>(); objects.Add("SearchCategories", Categories ?? new List <Category>()); var mainScreenProducts = ApiUtil.GetMainScreenProducts().Result; var bestSellerProducts = ApiUtil.GetBestSellerProducts().Result; var opportunityProducts = ApiUtil.GetOpportunityProducts().Result; var newProducts = ApiUtil.GetNewProducts().Result; var outletProducts = ApiUtil.GetOutletProducts().Result; var brands = ApiUtil.GetBrandList().Result; var categories = ApiUtil.GetCategoryList().Result; objects.Add("BestSellerProducts", bestSellerProducts); objects.Add("MainScreenProducts", mainScreenProducts); objects.Add("OpportunityProducts", opportunityProducts); objects.Add("NewProducts", newProducts); objects.Add("OutletProducts", outletProducts); objects.Add("Categories", categories); objects.Add("BrandList", brands); ViewBag.Data = objects; return(View()); }