9.2.2 Adding the Cart Summary; Listing 9-6 The Contents of the Summary.cshtml File
This commit is contained in:
parent
d17ea37a0d
commit
57c4f167ca
@ -154,6 +154,7 @@
|
||||
<Content Include="Views\Shared\ProductSummary.cshtml" />
|
||||
<Content Include="Views\Nav\Menu.cshtml" />
|
||||
<Content Include="Views\Cart\Index.cshtml" />
|
||||
<Content Include="Views\Cart\Summary.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
13
SportsStore/SportsStore.WebUI/Views/Cart/Summary.cshtml
Normal file
13
SportsStore/SportsStore.WebUI/Views/Cart/Summary.cshtml
Normal file
@ -0,0 +1,13 @@
|
||||
@model SportsStore.Domain.Entities.Cart
|
||||
|
||||
<div class="navbar-right">
|
||||
@Html.ActionLink("Checkout", "Index", "Cart",
|
||||
new { returnUrl = Request.Url.PathAndQuery },
|
||||
new { @class = "btn btn-default navbar-btn" } )
|
||||
</div>
|
||||
|
||||
<div class="navbar-text navbar-right">
|
||||
<b>Your cart:</b>
|
||||
@Model.Lines.Sum(x => x.Quantity) item(s),
|
||||
@Model.ComputeTotalValue().ToString("c")
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user