public ActionResult SubCategoriesPartialView() { HomeViewModel model = new HomeViewModel { SubCategories = Handler.GetSubCategories() }; return(PartialView(model)); }
public ActionResult ShopByCategory(int id, int?pageNo) { HomeViewModel model = new HomeViewModel(); List <Product> products = Handler.GetProductsByCategory(id); model.Products = products; return(View(model)); }
public ActionResult Details(int id) { HomeViewModel model = new HomeViewModel(); Product product = Handler.GetProductById(id); List <ProductSizes> availableSizes = Handler.GetProductSizeByProductId(id); model.Product = product; model.ProductSizes = availableSizes; return(View(model)); }
// GET: Home public ActionResult Index() { HomeViewModel model = new HomeViewModel { FeaturedProducts = Handler.GetFeaturedProducts(), NewProducts = Handler.GetNewProducts(8), Categories = Handler.GetCategories(), SubCategories = Handler.GetSubCategories() }; return(View(model)); }