@model SportsStore.WebUI.Models.CartIndexViewModel @{ ViewBag.Title = "Sports Store: Your Cart"; }

Your cart

@foreach (var line in Model.Cart.Lines) { }
Quantity Item Price Subtotal
@line.Quantity @line.Product.Name @line.Product.Price.ToString("c") @((line.Quantity * line.Product.Price).ToString("c")) @using (Html.BeginForm("RemoveFromCart", "cart")) { @Html.Hidden("ProductId", line.Product.ProductID) @Html.HiddenFor(x => x.ReturnUrl) }
Total: @Model.Cart.ComputeTotalValue().ToString("c")
Continue Shopping @Html.ActionLink("Checkout now", "Checkout", null, new { @class = "btn btn-primary" })