public ActionResult ProductDetail(ProductModel product) { ViewData["productName"] = product.ProductCategoryName; ViewData["image"] = product.ProductImageURL; ViewData["price"] = product.ProductPrice; ViewData["ProductId"] = product.ProductKId; ViewData["AddToCartItems"] = ShoppingCartService.CountShoppingCartItems(GetShoppingCartId()); return View(); }
public ActionResult Index(ProductModel product) { var productCartMgr = new ProductCartManager(); ViewBag.ItemsCount = productCartMgr.CountCartItems(GetShoppingCartId()); ViewBag.ProductId = product.Id; ViewBag.Price = product.Price; ViewBag.ProductName = product.Name; ViewBag.Description = product.Description; var productManager = new ProductManager(); var productImages = productManager.GetProductImagesById(product.Id); return View("ProductDetail", productImages); }