(productId)
| 39 | } |
| 40 | |
| 41 | export function removeFromCart(productId) { |
| 42 | const newCart = []; |
| 43 | |
| 44 | cart.forEach((cartItem) => { |
| 45 | if (cartItem.productId !== productId) { |
| 46 | newCart.push(cartItem); |
| 47 | } |
| 48 | }); |
| 49 | |
| 50 | cart = newCart; |
| 51 | |
| 52 | saveToStorage(); |
| 53 | } |
| 54 | |
| 55 | export function updateDeliveryOption(productId, deliveryOptionId) { |
| 56 | let matchingItem; |
no test coverage detected