assets/js/productDetails.js
//TODO: Add the selected item and quantity to the cart
Add the selected item and quantity to the cart
Add the selected item and quantity to the cart
function addToCart(event) {
    event.preventDefault();
    var item = productName.innerHTML;
    var price = productPrice.innerHTML;
    var img = productImage.src;
    var qyt = quantity.value;
    console.log('addTocart Fun',localStorage.getItem('cart'));
    cart.addItem(item, qyt, img, price);
    cart.saveToLocalStorage();
    cart.updateCounter();
  }
function addToCart ( event ) { event . preventDefault ( ) ; var item = productName . innerHTML ; var price = productPrice . innerHTML ; var img = productImage . src ; var qyt = quantity . value ; console . log ( 'addTocart Fun' , localStorage . getItem ( 'cart' ) ) ; cart . addItem ( item , qyt , img , price ) ; cart . saveToLocalStorage ( ) ; cart . updateCounter ( ) ; }
TODO: Add the selected item and quantity to the cart
TODO : Add the selected item and quantity to the cart
// TODO: suss out the item picked from the select list // TODO: get the quantity // TODO: using those, add one item to the Cart