|
5 | 5 | } |
6 | 6 |
|
7 | 7 | <div class="container"> |
8 | | - <article class="esh-basket-titles row"> |
9 | | - <section class="esh-basket-title col-xs-3">Product</section> |
10 | | - <section class="esh-basket-title col-xs-3 hidden-lg-down"></section> |
11 | | - <section class="esh-basket-title col-xs-2">Price</section> |
12 | | - <section class="esh-basket-title col-xs-2">Quantity</section> |
13 | | - <section class="esh-basket-title col-xs-2">Cost</section> |
14 | | - </article> |
15 | | - |
16 | | - @for (int i = 0; i < Model.Items.Count; i++) |
| 8 | + @if (TempData.ContainsKey("BasketInoperativeMsg")) |
| 9 | + { |
| 10 | + <br /> |
| 11 | + <div class="alert alert-warning" role="alert"> |
| 12 | + @TempData["BasketInoperativeMsg"] |
| 13 | + </div> |
| 14 | + } |
| 15 | + else |
17 | 16 | { |
18 | | - var item = Model.Items[i]; |
| 17 | + <article class="esh-basket-titles row"> |
| 18 | + <br /> |
| 19 | + @if (TempData.ContainsKey("BasketInoperativeMsg")) |
| 20 | + { |
| 21 | + <div class="alert alert-warning" role="alert"> |
| 22 | + @TempData["BasketInoperativeMsg"] |
| 23 | + </div> |
| 24 | + } |
19 | 25 |
|
20 | | - <article class="esh-basket-items row"> |
21 | | - <div> |
22 | | - <section class="esh-basket-item esh-basket-item--middle col-lg-3 hidden-lg-down"> |
23 | | - <img class="esh-basket-image" src="@item.PictureUrl" /> |
24 | | - </section> |
25 | | - <section class="esh-basket-item esh-basket-item--middle col-xs-3">@item.ProductName</section> |
26 | | - <section class="esh-basket-item esh-basket-item--middle col-xs-2">$ @item.UnitPrice.ToString("N2")</section> |
27 | | - <section class="esh-basket-item esh-basket-item--middle col-xs-2"> |
28 | | - <input type="hidden" name="@("quantities[" + i +"].Key")" value="@item.Id" /> |
29 | | - <input type="number" class="esh-basket-input" min="1" name="@("quantities[" + i +"].Value")" value="@item.Quantity" /> |
30 | | - </section> |
31 | | - <section class="esh-basket-item esh-basket-item--middle esh-basket-item--mark col-xs-2">$ @Math.Round(item.Quantity * item.UnitPrice, 2).ToString("N2")</section> |
| 26 | + <section class="esh-basket-title col-xs-3">Product</section> |
| 27 | + <section class="esh-basket-title col-xs-3 hidden-lg-down"></section> |
| 28 | + <section class="esh-basket-title col-xs-2">Price</section> |
| 29 | + <section class="esh-basket-title col-xs-2">Quantity</section> |
| 30 | + <section class="esh-basket-title col-xs-2">Cost</section> |
| 31 | + </article> |
| 32 | + |
| 33 | + @for (int i = 0; i < Model.Items.Count; i++) |
| 34 | + { |
| 35 | + var item = Model.Items[i]; |
| 36 | + |
| 37 | + <article class="esh-basket-items row"> |
| 38 | + <div> |
| 39 | + <section class="esh-basket-item esh-basket-item--middle col-lg-3 hidden-lg-down"> |
| 40 | + <img class="esh-basket-image" src="@item.PictureUrl" /> |
| 41 | + </section> |
| 42 | + <section class="esh-basket-item esh-basket-item--middle col-xs-3">@item.ProductName</section> |
| 43 | + <section class="esh-basket-item esh-basket-item--middle col-xs-2">$ @item.UnitPrice.ToString("N2")</section> |
| 44 | + <section class="esh-basket-item esh-basket-item--middle col-xs-2"> |
| 45 | + <input type="hidden" name="@("quantities[" + i +"].Key")" value="@item.Id" /> |
| 46 | + <input type="number" class="esh-basket-input" min="1" name="@("quantities[" + i +"].Value")" value="@item.Quantity" /> |
| 47 | + </section> |
| 48 | + <section class="esh-basket-item esh-basket-item--middle esh-basket-item--mark col-xs-2">$ @Math.Round(item.Quantity * item.UnitPrice, 2).ToString("N2")</section> |
| 49 | + </div> |
| 50 | + <div class="row"> |
| 51 | + |
| 52 | + </div> |
| 53 | + </article> |
| 54 | + |
| 55 | + <div class="esh-basket-items--border row"> |
| 56 | + @if (item.OldUnitPrice != 0) |
| 57 | + { |
| 58 | + <div class="alert alert-warning esh-basket-margin12" role="alert"> Note that the price of this article changed in our Catalog. The old price when you originally added it to the basket was $ @item.OldUnitPrice </div> |
| 59 | + } |
32 | 60 | </div> |
33 | | - <div class="row"> |
| 61 | + <br /> |
| 62 | + } |
34 | 63 |
|
35 | | - </div> |
36 | | - </article> |
| 64 | + <div class="container"> |
| 65 | + <article class="esh-basket-titles esh-basket-titles--clean row"> |
| 66 | + <section class="esh-basket-title col-xs-10"></section> |
| 67 | + <section class="esh-basket-title col-xs-2">Total</section> |
| 68 | + </article> |
37 | 69 |
|
38 | | - <div class="esh-basket-items--border row"> |
39 | | - @if (item.OldUnitPrice != 0) |
40 | | - { |
41 | | - <div class="alert alert-warning esh-basket-margin12" role="alert"> Note that the price of this article changed in our Catalog. The old price when you originally added it to the basket was $ @item.OldUnitPrice </div> |
42 | | - } |
| 70 | + <article class="esh-basket-items row"> |
| 71 | + <section class="esh-basket-item col-xs-10"></section> |
| 72 | + <section class="esh-basket-item esh-basket-item--mark col-xs-2">$ @Model.Total()</section> |
| 73 | + </article> |
| 74 | + |
| 75 | + <article class="esh-basket-items row"> |
| 76 | + <section class="esh-basket-item col-xs-7"></section> |
| 77 | + <section class="esh-basket-item col-xs-2"> |
| 78 | + <button class="btn esh-basket-checkout" name="name" value="" type="submit">[ Update ]</button> |
| 79 | + </section> |
| 80 | + <section class="esh-basket-item col-xs-3"> |
| 81 | + <input type="submit" |
| 82 | + class="btn esh-basket-checkout" |
| 83 | + value="[ Checkout ]" name="action" /> |
| 84 | + </section> |
| 85 | + </article> |
43 | 86 | </div> |
44 | | - <br/> |
45 | | - |
46 | 87 | } |
| 88 | + |
47 | 89 | </div> |
48 | 90 |
|
49 | | -<div class="container"> |
50 | | - <article class="esh-basket-titles esh-basket-titles--clean row"> |
51 | | - <section class="esh-basket-title col-xs-10"></section> |
52 | | - <section class="esh-basket-title col-xs-2">Total</section> |
53 | | - </article> |
54 | | - |
55 | | - <article class="esh-basket-items row"> |
56 | | - <section class="esh-basket-item col-xs-10"></section> |
57 | | - <section class="esh-basket-item esh-basket-item--mark col-xs-2">$ @Model.Total()</section> |
58 | | - </article> |
59 | | - |
60 | | - <article class="esh-basket-items row"> |
61 | | - <section class="esh-basket-item col-xs-7"></section> |
62 | | - <section class="esh-basket-item col-xs-2"> |
63 | | - <button class="btn esh-basket-checkout" name="name" value="" type="submit">[ Update ]</button> |
64 | | - </section> |
65 | | - <section class="esh-basket-item col-xs-3"> |
66 | | - <input type="submit" |
67 | | - class="btn esh-basket-checkout" |
68 | | - value="[ Checkout ]" name="action" /> |
69 | | - </section> |
70 | | - </article> |
71 | | -</div> |
| 91 | + |
0 commit comments