public ActionResult AddToCart(Cart cart, int productId, int quantity) { var itemQuantity = _catalogsHelper.GetQuantityItemById(productId); if (itemQuantity != 0) { var item = _catalogsHelper.GetItemById(productId); cart.AddItem(item, quantity); Alert.SetAlert(AlertStatus.Succes, "Poprawnie dodano przedmiot do koszyka!"); return(RedirectToAction("ItemDescription", new { productId = productId })); } else { Alert.SetAlert(AlertStatus.Danger, "Brak dostępnego towaru w sklepie!"); return(RedirectToAction("ItemDescription", new { productId = productId })); } }