public ActionResult ViewCart(List <ProductVisitCartVM> cart) { SessionHelper sessionHelper = new SessionHelper(); ProductVisitCartRepo productVisitCartRepo = new ProductVisitCartRepo(); productVisitCartRepo.SendCartList(sessionHelper.SessionID, cart); return(RedirectToAction("Index", new { id = sessionHelper.SessionID })); }
public ActionResult RemoveItem(int id) { SessionHelper sessionHelper = new SessionHelper(); ProductVisitCartRepo productVisitCartRepo = new ProductVisitCartRepo(); productVisitCartRepo.RemoveItemFromCart(sessionHelper.SessionID, id); return(RedirectToAction("ViewCart", new { id = sessionHelper.SessionID })); }
public ActionResult ViewCart(string id) { ProductVisitCartRepo productVisitCartRepo = new ProductVisitCartRepo(); return(View(productVisitCartRepo.GetCartList(System.Web.HttpContext.Current.Session.SessionID))); }