Exemplo n.º 1
0
        public ActionResult SubCategoriesPartialView()
        {
            HomeViewModel model = new HomeViewModel
            {
                SubCategories = Handler.GetSubCategories()
            };

            return(PartialView(model));
        }
Exemplo n.º 2
0
        public ActionResult ShopByCategory(int id, int?pageNo)
        {
            HomeViewModel  model    = new HomeViewModel();
            List <Product> products = Handler.GetProductsByCategory(id);

            model.Products = products;

            return(View(model));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        // 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));
        }