public ActionResult Order()
        {                                       //orderid, customerID, cropID, quantity, total_amount, address, fid, crop_name
            if (Session["customrdata"] != null) //fid session
            {
                int      id          = 0;
                Customer thecustomer = null;
                if (Session["thecustomer"] != null)
                {
                    thecustomer = (Customer)Session["thecustomer"];
                }

                if (Session["FARMERID"] != null)
                {
                    id = int.Parse(Session["FARMERID"].ToString());
                }
                int userData = int.Parse(Session["customrdata"].ToString());

                Cart        existingCart = this.HttpContext.Session["shoppingcart"] as Cart;
                List <Item> ilist        = new List <Item>();
                foreach (Item i in existingCart.items)
                {
                    BusinessManager.AddToOrder(i, userData, thecustomer.address, id);
                    ilist.Add(i);
                    crops c         = BusinessManager.getcrop(i.cropID);
                    int   totalLeft = c.quantity - i.quantity;
                    BusinessManager.updateCropquantity(i.cropID, totalLeft);
                }
                existingCart.items.Clear();
                ViewData["ilist"] = ilist;

                return(View());//add view
            }
            return(RedirectToAction("login", "Accounts"));
        }