Commit 428883dd authored by keita.onoguchi's avatar keita.onoguchi

追加

parent 42ef74b5
......@@ -164,6 +164,8 @@ public class EcsiteController {
public String Cart(Model model, @AuthenticationPrincipal LoginUser userDetails, LinkedHashMap<String, Items> items, ArrayList <Items> cart){
User user = userDetails.getUser();
model.addAttribute("user", user);
Wallets wallets = walletsService.findOne(user.getId());
model.addAttribute("wallets", wallets);
session.setAttribute("userId", user.getId());
items = (LinkedHashMap<String, Items>) session.getAttribute("cart");
if(items == null) {
......
......@@ -1688,7 +1688,7 @@ label {
/* カート画面 */
.th, .td {
font-size: 20px;
font-size: 16px;
}
.td {
......@@ -1738,6 +1738,11 @@ label {
padding-right: 115px;
padding-top: 20px;
}
#walletAmount {
text-align: right;
padding-right: 80px;
}
/* カート画面モーダル */
#buy {
......
......@@ -34,6 +34,7 @@
<div class="col-md-6">
<div class="header-top-menu">
<ul class="nav nav-pills navbar-right">
<li><a sec:authorize="hasRole('ROLE_ADMIN')" th:href="@{/limited/admin/management}">Management</a></li>
<!-- 履歴ページへ遷移 -->
<li><a th:href="@{/limited/log/{id}(id=${user.id})}">My Purchase Log</a></li>
<!-- カートページへ遷移 -->
......@@ -103,6 +104,7 @@
<tr class="row" id="theadTr">
<th class="thCart" id="imageTh">Image</th>
<th class="thCart" id="productNameTh">Product Name</th>
<th class="thCart" id="sizeTh">Size</th>
<th class="thCart" id="quantityTh">Quantity</th>
<th class="thCart" id="priceTh">Price</th>
</tr>
......@@ -113,6 +115,7 @@
<td class="hidden"><input th:text="${cart.shoesId}"/></td>
<td class="tdCart"><img th:src="@{/upload/{photo}(photo=${cart.photo})}" width="300" height="200"/></td>
<td class="tdCart"><p th:text= "${cart.shoesName}" class="textP">Convers All Star</p></td>
<td class="tdCart"><p th:text= "${cart.shoesSize}" class="textP">21</p></td>
<td class="tdCart"><input type="number" min="0" th:value="${cart.quantity}" class="textP itemCount"></input></td>
<td class="tdCart"><p th:text= "${cart.price}" class="textP">&yen;10000</p></td>
<td class="tdCart"><button type="button" class="itemCountChange">Change</button></td>
......@@ -124,6 +127,10 @@
<p th:case="null" id="total-price">Total Price<span id="total-price-span">&yen;0</span></p>
<p th:case="*" id="total-price">Total Price<span id="total-price-span" th:text="'&yen;' + ${totalPrice}">10000</span></p>
</div>
<br/>
<div id="walletAmount">
<p id="total-price">Wallet Amount<span id="total-price-span" th:text="'&yen;' + ${wallets.amount}">10000</span></p>
</div>
<div id="buy">
<button class="js-modal-open" id="buy-btn">Buy</button>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment