| [08aefc6] | 1 | @model KernelRecordsMVC.Application.ViewModels.CartViewModel
|
|---|
| 2 |
|
|---|
| [fa0fbaf] | 3 | @{
|
|---|
| 4 | ViewData["Title"] = "Cart";
|
|---|
| 5 | }
|
|---|
| [08aefc6] | 6 |
|
|---|
| [fa0fbaf] | 7 | <div class="cart-page">
|
|---|
| [08aefc6] | 8 |
|
|---|
| [fa0fbaf] | 9 | <div class="cart-header">
|
|---|
| [08aefc6] | 10 |
|
|---|
| [fa0fbaf] | 11 | <div>
|
|---|
| [08aefc6] | 12 |
|
|---|
| [fa0fbaf] | 13 | <span class="page-eyebrow">
|
|---|
| 14 | YOUR ORDER
|
|---|
| 15 | </span>
|
|---|
| [08aefc6] | 16 |
|
|---|
| [fa0fbaf] | 17 | <h1>Your Cart</h1>
|
|---|
| [08aefc6] | 18 |
|
|---|
| [fa0fbaf] | 19 | <p>
|
|---|
| 20 | Review your selected physical releases.
|
|---|
| 21 | </p>
|
|---|
| [08aefc6] | 22 |
|
|---|
| [fa0fbaf] | 23 | </div>
|
|---|
| [08aefc6] | 24 |
|
|---|
| 25 | <a asp-controller="Release"
|
|---|
| 26 | asp-action="Index"
|
|---|
| [fa0fbaf] | 27 | class="store-button secondary">
|
|---|
| [08aefc6] | 28 |
|
|---|
| [fa0fbaf] | 29 | Continue Shopping
|
|---|
| [08aefc6] | 30 |
|
|---|
| 31 | </a>
|
|---|
| 32 |
|
|---|
| 33 | </div>
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| [fa0fbaf] | 36 | @if (TempData["Error"] != null)
|
|---|
| 37 | {
|
|---|
| 38 | <div class="profile-alert"
|
|---|
| 39 | style="background:#f9e8e8;color:#a33;">
|
|---|
| 40 | @TempData["Error"]
|
|---|
| 41 | </div>
|
|---|
| 42 | }
|
|---|
| [08aefc6] | 43 |
|
|---|
| 44 |
|
|---|
| [fa0fbaf] | 45 | @if (!Model.Items.Any())
|
|---|
| 46 | {
|
|---|
| 47 | <div class="empty-store">
|
|---|
| [08aefc6] | 48 |
|
|---|
| [fa0fbaf] | 49 | <div class="empty-store-icon">
|
|---|
| 50 | 🛒
|
|---|
| 51 | </div>
|
|---|
| [08aefc6] | 52 |
|
|---|
| [fa0fbaf] | 53 | <h2>Your cart is empty</h2>
|
|---|
| [08aefc6] | 54 |
|
|---|
| [fa0fbaf] | 55 | <p>
|
|---|
| 56 | Browse our releases and add something to your order.
|
|---|
| 57 | </p>
|
|---|
| [08aefc6] | 58 |
|
|---|
| [fa0fbaf] | 59 | <a asp-controller="Release"
|
|---|
| 60 | asp-action="Index"
|
|---|
| 61 | class="store-button primary">
|
|---|
| [08aefc6] | 62 |
|
|---|
| [fa0fbaf] | 63 | Browse Releases
|
|---|
| [08aefc6] | 64 |
|
|---|
| [fa0fbaf] | 65 | </a>
|
|---|
| [08aefc6] | 66 |
|
|---|
| [fa0fbaf] | 67 | </div>
|
|---|
| 68 | }
|
|---|
| 69 | else
|
|---|
| 70 | {
|
|---|
| 71 | <div class="cart-layout">
|
|---|
| [08aefc6] | 72 |
|
|---|
| [fa0fbaf] | 73 | <div class="cart-items">
|
|---|
| [08aefc6] | 74 |
|
|---|
| [fa0fbaf] | 75 | <div class="cart-items-header">
|
|---|
| 76 | @Model.Items.Count item(s) in your cart
|
|---|
| 77 | </div>
|
|---|
| [08aefc6] | 78 |
|
|---|
| 79 |
|
|---|
| [fa0fbaf] | 80 | @foreach (var item in Model.Items)
|
|---|
| 81 | {
|
|---|
| 82 | <div class="cart-item">
|
|---|
| [08aefc6] | 83 |
|
|---|
| [fa0fbaf] | 84 | <a asp-controller="Release"
|
|---|
| 85 | asp-action="Details"
|
|---|
| 86 | asp-route-id="@item.ReleaseId"
|
|---|
| 87 | class="cart-item-cover">
|
|---|
| [08aefc6] | 88 |
|
|---|
| [fa0fbaf] | 89 | @if (!string.IsNullOrWhiteSpace(item.CoverPhoto))
|
|---|
| 90 | {
|
|---|
| 91 | <img src="@item.CoverPhoto"
|
|---|
| 92 | alt="@item.ReleaseTitle" />
|
|---|
| 93 | }
|
|---|
| 94 | else
|
|---|
| 95 | {
|
|---|
| 96 | <div class="cart-cover-placeholder">
|
|---|
| 97 | ♪
|
|---|
| 98 | </div>
|
|---|
| 99 | }
|
|---|
| [08aefc6] | 100 |
|
|---|
| [fa0fbaf] | 101 | </a>
|
|---|
| [08aefc6] | 102 |
|
|---|
| 103 |
|
|---|
| [fa0fbaf] | 104 | <div class="cart-item-info">
|
|---|
| [08aefc6] | 105 |
|
|---|
| [fa0fbaf] | 106 | <span class="cart-item-type">
|
|---|
| 107 | @item.Format
|
|---|
| 108 | </span>
|
|---|
| [08aefc6] | 109 |
|
|---|
| [fa0fbaf] | 110 | <h2>
|
|---|
| [08aefc6] | 111 |
|
|---|
| [fa0fbaf] | 112 | <a asp-controller="Release"
|
|---|
| 113 | asp-action="Details"
|
|---|
| 114 | asp-route-id="@item.ReleaseId">
|
|---|
| [08aefc6] | 115 |
|
|---|
| [fa0fbaf] | 116 | @item.ReleaseTitle
|
|---|
| [08aefc6] | 117 |
|
|---|
| [fa0fbaf] | 118 | </a>
|
|---|
| [08aefc6] | 119 |
|
|---|
| [fa0fbaf] | 120 | </h2>
|
|---|
| [08aefc6] | 121 |
|
|---|
| [fa0fbaf] | 122 | <div class="cart-item-price">
|
|---|
| [08aefc6] | 123 |
|
|---|
| [fa0fbaf] | 124 | @item.Price.ToString("C")
|
|---|
| 125 | each
|
|---|
| [08aefc6] | 126 |
|
|---|
| [fa0fbaf] | 127 | </div>
|
|---|
| [08aefc6] | 128 |
|
|---|
| [fa0fbaf] | 129 | </div>
|
|---|
| [08aefc6] | 130 |
|
|---|
| 131 |
|
|---|
| [fa0fbaf] | 132 | <div class="cart-item-quantity">
|
|---|
| [08aefc6] | 133 |
|
|---|
| [fa0fbaf] | 134 | <form asp-action="UpdateQuantity"
|
|---|
| 135 | method="post">
|
|---|
| [08aefc6] | 136 |
|
|---|
| [fa0fbaf] | 137 | @Html.AntiForgeryToken()
|
|---|
| [08aefc6] | 138 |
|
|---|
| [fa0fbaf] | 139 | <input type="hidden"
|
|---|
| 140 | name="id"
|
|---|
| 141 | value="@item.ProductId" />
|
|---|
| [08aefc6] | 142 |
|
|---|
| [fa0fbaf] | 143 | <input type="number"
|
|---|
| 144 | name="quantity"
|
|---|
| 145 | value="@item.Quantity"
|
|---|
| 146 | min="1"
|
|---|
| 147 | max="@item.Stock" />
|
|---|
| [08aefc6] | 148 |
|
|---|
| [fa0fbaf] | 149 | <button type="submit">
|
|---|
| 150 | Update
|
|---|
| 151 | </button>
|
|---|
| [08aefc6] | 152 |
|
|---|
| [fa0fbaf] | 153 | </form>
|
|---|
| [08aefc6] | 154 |
|
|---|
| [fa0fbaf] | 155 | </div>
|
|---|
| [08aefc6] | 156 |
|
|---|
| 157 |
|
|---|
| [fa0fbaf] | 158 | <div class="cart-item-total">
|
|---|
| [08aefc6] | 159 |
|
|---|
| [fa0fbaf] | 160 | @item.Total.ToString("C")
|
|---|
| [08aefc6] | 161 |
|
|---|
| [fa0fbaf] | 162 | </div>
|
|---|
| [08aefc6] | 163 |
|
|---|
| 164 |
|
|---|
| [fa0fbaf] | 165 | <form asp-action="RemoveProduct"
|
|---|
| 166 | method="post">
|
|---|
| [08aefc6] | 167 |
|
|---|
| [fa0fbaf] | 168 | @Html.AntiForgeryToken()
|
|---|
| [08aefc6] | 169 |
|
|---|
| [fa0fbaf] | 170 | <input type="hidden"
|
|---|
| 171 | name="id"
|
|---|
| 172 | value="@item.ProductId" />
|
|---|
| [08aefc6] | 173 |
|
|---|
| [fa0fbaf] | 174 | <button type="submit"
|
|---|
| 175 | class="cart-remove"
|
|---|
| 176 | title="Remove">
|
|---|
| [08aefc6] | 177 |
|
|---|
| [fa0fbaf] | 178 | ×
|
|---|
| [08aefc6] | 179 |
|
|---|
| [fa0fbaf] | 180 | </button>
|
|---|
| [08aefc6] | 181 |
|
|---|
| [fa0fbaf] | 182 | </form>
|
|---|
| [08aefc6] | 183 |
|
|---|
| [fa0fbaf] | 184 | </div>
|
|---|
| 185 | }
|
|---|
| [08aefc6] | 186 |
|
|---|
| [fa0fbaf] | 187 | </div>
|
|---|
| [08aefc6] | 188 |
|
|---|
| 189 |
|
|---|
| [fa0fbaf] | 190 | <aside class="cart-summary">
|
|---|
| [08aefc6] | 191 |
|
|---|
| [fa0fbaf] | 192 | <span class="section-label">
|
|---|
| 193 | ORDER SUMMARY
|
|---|
| 194 | </span>
|
|---|
| [08aefc6] | 195 |
|
|---|
| [fa0fbaf] | 196 | <h2>
|
|---|
| 197 | Your Order
|
|---|
| 198 | </h2>
|
|---|
| [08aefc6] | 199 |
|
|---|
| 200 |
|
|---|
| [fa0fbaf] | 201 | <div class="summary-line">
|
|---|
| [08aefc6] | 202 |
|
|---|
| [fa0fbaf] | 203 | <span>
|
|---|
| 204 | Items
|
|---|
| 205 | </span>
|
|---|
| [08aefc6] | 206 |
|
|---|
| [fa0fbaf] | 207 | <strong>
|
|---|
| 208 | @Model.Items.Sum(x => x.Quantity)
|
|---|
| 209 | </strong>
|
|---|
| [08aefc6] | 210 |
|
|---|
| [fa0fbaf] | 211 | </div>
|
|---|
| [08aefc6] | 212 |
|
|---|
| 213 |
|
|---|
| [fa0fbaf] | 214 | <div class="summary-line total">
|
|---|
| [08aefc6] | 215 |
|
|---|
| [fa0fbaf] | 216 | <span>
|
|---|
| 217 | Total
|
|---|
| 218 | </span>
|
|---|
| [08aefc6] | 219 |
|
|---|
| 220 | <strong>
|
|---|
| [fa0fbaf] | 221 | @Model.Total.ToString("C")
|
|---|
| [08aefc6] | 222 | </strong>
|
|---|
| 223 |
|
|---|
| 224 | </div>
|
|---|
| 225 |
|
|---|
| 226 |
|
|---|
| 227 | <a asp-action="Checkout"
|
|---|
| [fa0fbaf] | 228 | class="store-button primary full">
|
|---|
| [08aefc6] | 229 |
|
|---|
| 230 | Proceed to Checkout
|
|---|
| 231 |
|
|---|
| 232 | </a>
|
|---|
| 233 |
|
|---|
| [fa0fbaf] | 234 | </aside>
|
|---|
| [08aefc6] | 235 |
|
|---|
| 236 | </div>
|
|---|
| [fa0fbaf] | 237 | }
|
|---|
| [08aefc6] | 238 |
|
|---|
| 239 | </div> |
|---|