diff --git a/views/order-details.ejs b/views/order-details.ejs index 45cf64ffcbda6a0a3e8f6c7687d62b3933553497..1f3ca074067982c6cbdc01b330d0b80b3f1cd978 100644 --- a/views/order-details.ejs +++ b/views/order-details.ejs @@ -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"> - <% 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> - </div> - </div> - <% }); %> + <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 => { %> + <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 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