ร้านขาย Nitro

รายการ Nitro

Nitro Basic

Nitro Basic

ราคา: 100 บาท

Nitro Boost

Nitro Boost

ราคา: 200 บาท

body { font-family: Arial, sans-serif; background-color: #dff0ff; text-align: center; } header { background-color: #0099ff; color: white; padding: 15px; } nav a { color: white; text-decoration: none; margin: 0 15px; } .products { display: flex; justify-content: center; margin-top: 20px; } .product { background: white; padding: 15px; margin: 10px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } button { background: #007bff; color: white; border: none; padding: 10px; cursor: pointer; } button:hover { background: #0056b3; } รถเข็น

รถเข็นของฉัน

สินค้าที่เลือก

ยอดรวม: 0 บาท

เข้าสู่ระบบ

เข้าสู่ระบบ

let cart = []; function addToCart(productName, price) { cart.push({ name: productName, price: price }); localStorage.setItem("cart", JSON.stringify(cart)); alert(productName + " ถูกเพิ่มลงในรถเข็น!"); } function loadCart() { let cartList = document.getElementById("cart-list"); let totalPrice = document.getElementById("total-price"); cart = JSON.parse(localStorage.getItem("cart")) || []; cartList.innerHTML = ""; let sum = 0; cart.forEach((item, index) => { let li = document.createElement("li"); li.textContent = `${item.name} - ${item.price} บาท`; cartList.appendChild(li); sum += item.price; }); totalPrice.textContent = sum; } function checkout() { alert("ไปหน้าชำระเงิน!"); } if (document.getElementById("cart-list")) { loadCart(); }