Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 2806694b authored by 65160270's avatar 65160270
Browse files

update-edit

parent e4954ca5
No related branches found
No related tags found
No related merge requests found
......@@ -11,35 +11,36 @@
<div class="info-section">
<h3>Shipping Address</h3>
<p>
<span id="shipping-address"><%= order.shipping_address %></span>
<input type="text" id="new-address" value="<%= order.shipping_address %>" style="display:none;">
</p>
<button id="edit-btn">แก้ไขที่อยู่</button>
<button id="save-btn" style="display:none;">บันทึก</button>
<p><%= order.shipping_address %></p>
</div>
</div>
<div class="order-items-detail">
<h3>Order Items</h3>
<div class="items-grid">
<table>
<thead>
<tr>
<th>Order ID</th>
<th>Product ID</th>
<th>Product Name</th>
<th>Quantity</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<% items.forEach(item => { %>
<div class="item-card">
<img src="<%= item.image_url %>" alt="<%= item.name %>">
<div class="item-info">
<h4><%= item.name %></h4>
<p>Quantity: <%= item.quantity %></p>
<p>Price per unit: ฿<%= item.price.toLocaleString() %></p>
<p>Subtotal: ฿<%= (item.price * item.quantity).toLocaleString() %></p>
<tr>
<td><%= item.order_id %></td>
<td><%= item.product_id %></td>
<td><%= item.name %></td>
<td><%= item.quantity %></td>
<td>฿<%= item.price.toFixed(2) %></td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</div>
<% }); %>
</div>
</div>
<div class="order-actions">
<a href="/order/history" class="back-btn">Back to Order History</a>
<a href="/" class="continue-shopping">Continue Shopping</a>
</div>
</div>
<%- include('partials/footer') %>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment