Skip to content

Commit

Permalink
Section 10 - Load Summary UI with data
Browse files Browse the repository at this point in the history
  • Loading branch information
bhrugen committed Sep 25, 2021
1 parent 41fe1f3 commit d5ce8d0
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions BulkyBookWeb/Areas/Customer/Views/Cart/Summary.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<form method="post">
@model BulkyBook.Models.ViewModels.ShoppingCartVM

<form method="post">
<br />
<div class="container">
<div class="card">
Expand All @@ -9,7 +11,7 @@
Order Summary
</div>
<div class="col-6 text-end">
<a class="btn btn-outline-info btn-sm">Back to Cart</a>
<a asp-action="Index" class="btn btn-outline-info btn-sm">Back to Cart</a>
</div>
</div>
</div>
Expand All @@ -27,47 +29,53 @@
<label>Name</label>
</div>
<div class="col-9">
<input class="form-control" />
<input asp-for="OrderHeader.Name" class="form-control" />
<span asp-validation-for="OrderHeader.Name" class="text-danger"></span>
</div>
</div>
<div class="row my-1">
<div class="col-3">
<label>Phone</label>
</div>
<div class="col-9">
<input class="form-control" />
<input asp-for="OrderHeader.PhoneNumber" class="form-control" />
<span asp-validation-for="OrderHeader.PhoneNumber" class="text-danger"></span>
</div>
</div>
<div class="row my-1">
<div class="col-3">
<label>Street Address</label>
</div>
<div class="col-9">
<input class="form-control" />
<input asp-for="OrderHeader.StreetAddress" class="form-control" />
<span asp-validation-for="OrderHeader.StreetAddress" class="text-danger"></span>
</div>
</div>
<div class="row my-1">
<div class="col-3">
<label>City</label>
</div>
<div class="col-9">
<input class="form-control" />
<input asp-for="OrderHeader.City" class="form-control" />
<span asp-validation-for="OrderHeader.City" class="text-danger"></span>
</div>
</div>
<div class="row my-1">
<div class="col-3">
<label>State</label>
</div>
<div class="col-9">
<input class="form-control" />
<input asp-for="OrderHeader.State" class="form-control" />
<span asp-validation-for="OrderHeader.State" class="text-danger"></span>
</div>
</div>
<div class="row my-1">
<div class="col-3">
<label>Postal Code</label>
</div>
<div class="col-9">
<input class="form-control" />
<input asp-for="OrderHeader.PostalCode" class="form-control" />
<span asp-validation-for="OrderHeader.PostalCode" class="text-danger"></span>
</div>
</div>
</div>
Expand All @@ -76,18 +84,19 @@
<span class="text-info">Order Summary:</span>
</h4>
<ul class="list-group mb-3">

@foreach(var details in Model.ListCart)
{
<li class="list-group-item d-flex justify-content-between">
<div>
<h6 class="my-0">Title</h6>
<small class="text-muted">Quantity: Count</small>
<h6 class="my-0">@details.Product.Title</h6>
<small class="text-muted">Quantity: @details.Count</small>
</div>
<span class="text-muted">$$$ </span>
<span class="text-muted">@((details.Price * details.Count).ToString("c")) </span>
</li>

}
<li class="list-group-item d-flex justify-content-between bg-light">
<small class="text-info">Total (USD)</small>
<strong class="text-info">$$$</strong>
<strong class="text-info">@Model.OrderHeader.OrderTotal.ToString("c")</strong>
</li>
</ul>
</div>
Expand All @@ -97,7 +106,9 @@
<div class="card-footer">
<div class="row">
<div class="col-12 col-md-8 pt-2">
<p style="color:maroon; font-size:14px;">Estimate Arrival Date: </p>
<p style="color:maroon; font-size:14px;">Estimate Arrival Date:
@DateTime.Now.AddDays(7).ToShortDateString() - @DateTime.Now.AddDays(14).ToShortDateString()
</p>
</div>
<div class="col-12 col-md-4">
<button type="submit" value="Place Order" class="btn btn-primary form-control">Place Order</button>
Expand Down

0 comments on commit d5ce8d0

Please sign in to comment.