().WithConstructorArgument("settings", emailSettings);
+
}
}
diff --git a/SportsStore.WebUI/SportsStore.WebUI.csproj b/SportsStore.WebUI/SportsStore.WebUI.csproj
index 9dba5a6..8f64b70 100644
--- a/SportsStore.WebUI/SportsStore.WebUI.csproj
+++ b/SportsStore.WebUI/SportsStore.WebUI.csproj
@@ -113,6 +113,7 @@
+
@@ -142,6 +143,7 @@
Global.asax
+
@@ -158,6 +160,9 @@
+
+
+
Web.config
diff --git a/SportsStore.WebUI/Views/Cart/Checkout.cshtml b/SportsStore.WebUI/Views/Cart/Checkout.cshtml
new file mode 100644
index 0000000..f4b0e0a
--- /dev/null
+++ b/SportsStore.WebUI/Views/Cart/Checkout.cshtml
@@ -0,0 +1,74 @@
+@model SportsStore.Domain.Entities.ShippingDetails
+
+@{
+ ViewBag.Title = "SportStore Checkout";
+}
+
+Checkout
+Please enter your details, and we'll ship your goods right away!
+
+@using (Html.BeginForm())
+{
+ @Html.ValidationSummary()
+
+ Ship to
+
+ Name:
+ @Html.TextBoxFor(x => x.Name, new { @class = "form-control" } )
+
+
+ Address
+
+ foreach (var property in ViewData.ModelMetadata.Properties)
+ {
+ if (property.PropertyName != "Name" && property.PropertyName != "GiftWrap")
+ {
+
+ @(property.DisplayName ?? property.PropertyName)
+ @Html.TextBox(property.PropertyName, null, new { @class = "form-control" })
+
+ }
+ }
+
+ @*
+ Line 1:
+ @Html.TextBoxFor(x => x.Line1, new { @class = "form-control" })
+
+
+ Line 2:
+ @Html.TextBoxFor(x => x.Line2, new { @class = "form-control" })
+
+
+ Line 3:
+ @Html.TextBoxFor(x => x.Line3, new { @class = "form-control" })
+
+
+ City:
+ @Html.TextBoxFor(x => x.City, new { @class = "form-control" })
+
+
+ State:
+ @Html.TextBoxFor(x => x.State, new { @class = "form-control" })
+
+
+ Zip:
+ @Html.TextBoxFor(x => x.Zip, new { @class = "form-control" })
+
+
+ Country:
+ @Html.TextBoxFor(x => x.Country, new { @class = "form-control" })
+
*@
+
+ Options
+
+
+ @Html.EditorFor(x => x.GiftWrap)
+ Gift wrap these items
+
+
+
+
+
+
+}
+
diff --git a/SportsStore.WebUI/Views/Cart/Completed.cshtml b/SportsStore.WebUI/Views/Cart/Completed.cshtml
new file mode 100644
index 0000000..1e18cce
--- /dev/null
+++ b/SportsStore.WebUI/Views/Cart/Completed.cshtml
@@ -0,0 +1,8 @@
+
+@{
+ ViewBag.Title = "SportsStore: Order Submitted";
+}
+
+Thanks!
+Thanks for placing your order. We'll ship your goods as soon as possible.
+
diff --git a/SportsStore.WebUI/Views/Cart/Index.cshtml b/SportsStore.WebUI/Views/Cart/Index.cshtml
index b2233d5..05b8ae0 100644
--- a/SportsStore.WebUI/Views/Cart/Index.cshtml
+++ b/SportsStore.WebUI/Views/Cart/Index.cshtml
@@ -3,8 +3,12 @@
ViewBag.Title = "Sports Store: Your Cart";
}
+
+
Your cart
-
+
Continue Shopping
+ @Html.ActionLink("Checkout now", "Checkout", null, new { @class = "btn btn-primary" })
diff --git a/SportsStore.WebUI/Views/Cart/Summary.cshtml b/SportsStore.WebUI/Views/Cart/Summary.cshtml
new file mode 100644
index 0000000..6b3605f
--- /dev/null
+++ b/SportsStore.WebUI/Views/Cart/Summary.cshtml
@@ -0,0 +1,15 @@
+@model SportsStore.Domain.Entities.Cart
+
+
+ @Html.ActionLink("Checkout", "Index", "Cart",
+ new { returnUrl = Request.Url.PathAndQuery },
+ new { @class = "btn btn-default navbar-btn" }
+ )
+
+
+
+
+ Your cart:
+ @Model.Lines.Sum(x => x.Quantity) item(s),
+ @Model.ComputeTotalValue().ToString("c")
+
\ No newline at end of file
diff --git a/SportsStore.WebUI/Views/Shared/_Layout.cshtml b/SportsStore.WebUI/Views/Shared/_Layout.cshtml
index 740511c..0fc12ac 100644
--- a/SportsStore.WebUI/Views/Shared/_Layout.cshtml
+++ b/SportsStore.WebUI/Views/Shared/_Layout.cshtml
@@ -5,11 +5,13 @@
+
@ViewBag.Title
diff --git a/SportsStore.WebUI/Web.config b/SportsStore.WebUI/Web.config
index 743df41..b4712a1 100644
--- a/SportsStore.WebUI/Web.config
+++ b/SportsStore.WebUI/Web.config
@@ -16,6 +16,7 @@
+