Spaces:
Sleeping
Sleeping
Update templates/cart.html
Browse files- templates/cart.html +2 -2
templates/cart.html
CHANGED
@@ -259,8 +259,8 @@
|
|
259 |
// .catch(err => console.error("Error:", err));
|
260 |
// }
|
261 |
function updateQuantity(action, itemName, customerEmail) {
|
262 |
-
|
263 |
-
|
264 |
|
265 |
// Update quantity based on action
|
266 |
if (action === 'increase') {
|
|
|
259 |
// .catch(err => console.error("Error:", err));
|
260 |
// }
|
261 |
function updateQuantity(action, itemName, customerEmail) {
|
262 |
+
let quantityInput = document.querySelector(`input[data-item-name="${itemName}"]`);
|
263 |
+
let quantity = parseInt(quantityInput.value, 10); // Get the value as an integer
|
264 |
|
265 |
// Update quantity based on action
|
266 |
if (action === 'increase') {
|