diff --git a/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj b/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj index 4de9405..1bd5eb2 100644 --- a/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj +++ b/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj @@ -152,6 +152,7 @@ + Web.config @@ -161,7 +162,6 @@ - diff --git a/SportsStore/SportsStore.WebUI/Views/Cart/Index.cshtml b/SportsStore/SportsStore.WebUI/Views/Cart/Index.cshtml new file mode 100644 index 0000000..62a3f92 --- /dev/null +++ b/SportsStore/SportsStore.WebUI/Views/Cart/Index.cshtml @@ -0,0 +1,42 @@ +@model SportsStore.WebUI.Models.CartIndexViewModel + +@{ + ViewBag.Title = "Sports Store: Your Cart"; +} + +Your cart + + + + Quantity + Item + Price + Subtotal + + + + @foreach (var line in Model.Cart.Lines) { + + @line.Quantity + @line.Product.Name + @line.Product.Price.ToString("c") + + @((line.Quantity * line.Product.Price).ToString("c")) + + + } + + + + Total: + + @Model.Cart.ComputeTotalValue().ToString("c") + + + + + + + Continue shopping + +