예제 #1
0
        public IActionResult Index(string categorySlug = "all-categories", string brandSlug = "all-brands")
        {
            ViewData["SelectedCategory"] = categorySlug;
            ViewData["SelectedBrand"]    = brandSlug;
            ViewData["OriginalUrl"]      = "OriginalUrl";

            ViewData["CartTotal"]      = _cartService.GetCartTotal();
            ViewData["CartItemsCount"] = _cartService.CartItemsCount();
            ViewData["CartItems"]      = _cartService.GetCartItems();

            var pagedProducts = _catalogService.FetchProducts(categorySlug, brandSlug);

            return(View(pagedProducts));
        }
예제 #2
0
        public FetchProductsResponse GetProducts(FetchProductsRequest request)
        {
            var fetchProductsResponse = _catalogService.FetchProducts(request);

            return(fetchProductsResponse);
        }