// * Add (or subtract) product's qty public void AddQty(int amount) { if (sessionData.user.username == "") { menuScript.TogglePopup("NoAuth"); } else { qty += amount; sessionData.AddToCart( productAttr.code, productAttr.name, productAttr.category_code, productAttr.price, productAttr.qty, qty ); if (qty >= 0) { SetQty(); } else { qty = 0; } } }
public IActionResult AddProduct(int id) { _Session.AddToCart(id, _Connection); return(RedirectToAction("Menu")); }