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)); }
public FetchProductsResponse GetProducts(FetchProductsRequest request) { var fetchProductsResponse = _catalogService.FetchProducts(request); return(fetchProductsResponse); }