public IActionResult Index(string category_slug = "all-categories", string brand_slug = "all-brands") { ViewData["SelectedCategory"] = category_slug; ViewData["SelectedBrand"] = brand_slug; var pagedProducts = _catalogueService.FetchProducts(category_slug, brand_slug); return(View(pagedProducts)); }
public IActionResult Index(string category_slug = "all-categories", string brand_slug = "all-brands") { ViewData["SelectedCategory"] = category_slug; ViewData["SelectedBrand"] = brand_slug; ViewData["CartTotal"] = _cartService.GetCartTotal(); ViewData["CartItemsCount"] = _cartService.CartItemsCount(); ViewData["CartItems"] = _cartService.GetCartItems(); var pagedProducts = _catalogueService.FetchProducts(category_slug, brand_slug); ViewData["Page"] = pagedProducts.PagedProducts.CurrentPage; return(View(pagedProducts)); }
public FetchProductsResponse GetProducts(FetchProductsRequest fetchProductsRequest) { var fetchProductsResponse = _catalogueService.FetchProducts(fetchProductsRequest); return(fetchProductsResponse); }
public FetchProductResponse FetchProduct(FetchProductRequest fetchproductRequest) { var product = catalogueService.FetchProducts(fetchproductRequest); return(product); }