From 4c727541603cd8c24ba8276dda285d5084f3e157 Mon Sep 17 00:00:00 2001
From: 65160270 <65160270@go.buu.ac.th>
Date: Fri, 28 Mar 2025 23:19:15 +0700
Subject: [PATCH] update-cart

---
 views/index.ejs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/views/index.ejs b/views/index.ejs
index 897315a..ee1007c 100644
--- a/views/index.ejs
+++ b/views/index.ejs
@@ -1,9 +1,8 @@
 <%- include('partials/header') %>
 
-
 <a href="/products/add">
     <button style="background-color: blue; color: white; padding: 10px 15px; border: none; cursor: pointer;">
-        เพิ่มสินค้า
+        Add Product
     </button>
 </a>
 <div class="products">
@@ -13,7 +12,7 @@
             <img src="<%= product.image_url %>" alt="<%= product.name %>">
             <h3><%= product.name %></h3>
             <p><%= product.description %></p>
-            <p>สินค้าเหลือ <%= product.stock %> ชิ้น</p>
+            <p>Stock left: <%= product.stock %> pcs</p>
             <p class="price">฿<%= product.price.toLocaleString() %></p>
             <form action="/cart/add" method="POST">
                 <input type="hidden" name="productId" value="<%= product.id %>">
@@ -21,10 +20,10 @@
                 <button type="submit">Add to Cart</button>
             </form>
             <td>
-                <a href="/products/edit/<%= product.id %>">แก้ไข</a> <!-- ปุ่มแก้ไข -->
+                <a href="/products/edit/<%= product.id %>">Edit</a> <!-- Edit button -->
             </td>
         </div>
     <% }); %>
 </div>
 
-<%- include('partials/footer') %>
\ No newline at end of file
+<%- include('partials/footer') %>
-- 
GitLab