0% found this document useful (0 votes)
11 views22 pages

Food Portal Management System Guide

The Food Portal Management System is a Python console application designed for managing online food orders, menu items, and customer data with MySQL integration. It features CRUD operations for food items and order tracking, enabling efficient order placement and billing. Future enhancements include migrating to a web/mobile app and adding payment gateways and delivery tracking.

Uploaded by

pusphasrivalli9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views22 pages

Food Portal Management System Guide

The Food Portal Management System is a Python console application designed for managing online food orders, menu items, and customer data with MySQL integration. It features CRUD operations for food items and order tracking, enabling efficient order placement and billing. Future enhancements include migrating to a web/mobile app and adding payment gateways and delivery tracking.

Uploaded by

pusphasrivalli9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

FOOD PORTAL MANAGEMENT SYSTEM

Urban Eats

Phone_No:1234567891, 9876543210
Hardware Requirements:

 Desktop
 PC

Software Requirements:

 Python
 Mysql
 Mysql Connector Module
Introduction

The Food Portal Management System is a Python-based

console application for managing online food orders, menu

items, customer data, and automated billing through MySQL

integration. It streamlines operations by replacing manual

processes with digital efficiency, supporting CRUD

operations on food items and order tracking.

Objectives

 Digitally store and manage food items, prices, and

inventory

 Enable seamless customer order placement and tracking

 Generate bills with automatic total calculations

 Securely maintain customer profiles including contact

and order history

 Offer intuitive admin controls for menu updates

 Showcase Python-MySQL connectivity with robust error

handling
Key Features

 Full CRUD (add, view, search, update, delete) for food

items, customers, and employees

 Order placement with quantity-based pricing and

summary display

 Real-time bill computation and receipt generation

 Menu-driven text interface with database persistence

 View reports for orders, sales, and categories

Technology Stack

 Python 3.x with functions, loops, conditionals, and

exceptions

 MySQL database for tables like Food, Customer, Order,

Employee, and Receipt

 MySQL Connector for seamless connectivity

 Localhost deployment for single-user access

Advantages

 Speeds up ordering and reduces errors through

automation

 Centralizes data for easy retrieval and reporting


Limitations

 Lacks GUI, online payments, and multi-user support

 Single-server operation without real-time updates

Future Enhancements

 Migrate to web/mobile app using Django/Flask

 Add UPI/payment gateways and admin authentication

 Implement delivery tracking, inventory alerts, and role-

based access
Source Code for Food Portal Management System
and Outputs
#Creating Database

import [Link] as food

def Create_DB():

con=[Link](host='localhost',user='root',password='class12')

try:

if con.is_connected():

cur=[Link]()

Q="CREATE DATABASE food"

[Link](Q)

print("food database created")

except:

print("Database name already exists")

[Link]()

#Creating Tables

def Create_Table():

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')

try:

if con.is_connected():

cur=[Link]()

Q="CREATE TABLE food_items(SNO INT PRIMARY


KEY,Food_Name VARCHAR(25),Price INT,Food_type varchar(10))"

[Link](Q)
print("food_items table created succesfully")

except:

print("Table name already exist:")

[Link]()

def Table_Orders():

con =
[Link](host='localhost',user='root',password='class12',database='
food')

if con.is_connected():

cur = [Link]()

Q = "CREATE TABLE Orders_List(Sno int auto_increment primary


key,Customer_name varchar(25),Food_Name varchar(30),qty
int,Phone_no bigint,Address varchar(40))"

try:

[Link](Q)

print("Orders_List table created successfully")

except [Link] as e:

print("Error:", e)

else:

print("Database connection failed")

[Link]()

#Calling Function

Create_DB()

Create_Table()
Table_Orders()

#Adding Foods

def add_food():

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')

cur=[Link]()

ch="y"

while ch=="y":

SNO=int(input("Enter Food no:"))

Food_Name=input("Enter Food name:")

Price=int(input("Enter the Price:"))

Food_type=input("Enter the Food type:")

[Link]("insert into food_items


values({},'{}',{},'{}')".format(SNO,Food_Name,Price,Food_type))

print("Food Added Successfully")

[Link]()

ch=input("do you want to continue(y/n):")

#Displaying Menu

def Menu():

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')
cur=[Link]()

[Link]("select*from food_items")

data=[Link]()

for i in data:

print(i)

#Taking Orders

def Orders():

print("==============================")

print("Welcome to Online Food Stall")

print("Enter the Customer details")

print("==============================")

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')

cur=[Link]()

[Link]("select*from food_items")

data=[Link]()

for i in data:

print(i)

ch="y"

while ch=="y":

Customer_Name=input("Enter the name:")

Food_Name=input("Enter Food name:")

qty=int(input("Enter the QTY:"))

Phone_No=int(input("Enter moblie no:"))


Address=input("Enter the address:")

query ="INSERT INTO Orders_List (Customer_Name, Food_Name,


qty, Phone_No, Address) VALUES ('{}', '{}', {}, {},
'{}')".format(Customer_Name, Food_Name, qty, Phone_No, Address)

[Link](query)

print("Order taken Successfully")

[Link]()

tot=0

if Food_Name=="Paneer Makhana":

PaneerMakhana=320

tot+=qty*PaneerMakhana

if Food_Name=="Chicken Kabab":

ChickenKabab=300

tot+=qty*ChickenKabab

if Food_Name=="Butter Naan":

ButterNaan=230

tot+=qty*ButterNaan

if Food_Name=="Double Egg Chicken":

DoubleEggChicken=200

tot+=qty*DoubleEggChicken

if Food_Name=="Pav Bhaji":

PavBhaji=299

tot+=qty*PavBhaji

if Food_Name=="Mutton Dum Biryani":

MuttonDumBiryani=480
tot+=qty*MuttonDumBiryani

if Food_Name=="South Indian Tali":

SouthIndianTali=899

tot+qty*SouthIndianTali

if Food_Name=="Chicken Tikka Dum Biryani":

ChickenTikkaDumBiryani=789

tot+=qty*ChickenTikkaDumBiryani

if Food_Name=="Regular Mutton Biryani":

RegularMuttonBiryani=400

tot+=qty*RegularMuttonBiryani

if Food_Name=="Paneer Dum Biryani":

PaneerDumBiryani=380

tot+=qty*PaneerDumBiryani

if Food_Name=="Butter Chicken":

ButterChicken=799

tot+=qty*ButterChicken

if Food_Name=="Chicken Tikka Roll":

ChickenTikkaRoll=320

tot+=qty*ChickenTikkaRoll

print("Total Amount:",tot)

ch=input("do you want to continue(y/n):"

#Updating Foods

def update_food():

print("==============================")
print("Welcome to Update Screen ")

print("==============================")

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')

cur=[Link]()

print("1. update food name")

print("2. update food price")

eg=int(input("Enter the Choice:"))

cs="y"

while cs=="y":

if eg==1:

SNO=int(input("Enter the food no that you want to update:"))

Food_Name=input("Enter the updated food name:")

[Link]("update food_items set Food_Name='{}'where


SNO={}".format(Food_Name,SNO))

print("updated")

[Link]()

elif eg==2:

SNO=int(input("Enter the SNO that you want to update:"))

Price=int(input("Enter New Price:"))

[Link]("update food_items set Price={} where


SNO={}".format(Price,SNO))

print("updated")

[Link]()
cs=(input("do you want to continue(y/n):"))

# Deleting Foods

def delete_food():

print("==============================")

print("Welcome to Delete Screen ")

print("==============================")

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')

cur=[Link]()

SNO=int(input("Enter the SNO that you want to delete:"))

[Link]("delete from food_items where SNO={}".format(SNO))

print("deleted successfully")

[Link]()

#Customers Details

def view_orders():

print("==============================")

print("Welcome to Customers Details Screen ")

print("==============================")

con=[Link](host='localhost',user='root',password='class12',datab
ase='food')

cur=[Link]()
k=("select*from Orders_List")

print("Details of all orders are:")

[Link](k)

info=[Link]()

for i in info:

print("================================")

print("Sno:",i[0])

print("Customer Name:",i[1])

print("Food Name:",i[2])

print("QTY:",i[3])

print("Phone No:",i[4])

print("Address:",i[5])

print("================================")

#Admin & Customer Login

print("\t\t__________________________________________")

print("\t\t FOOD PORTAL MANAGENT SYSTEM - CUSTOMER & ADMIN


")

print("\t\t__________________________________________")

print("\t\t Urban Eats ")

print("\t\t ~~~~~~~~~~~~~~~~~~~~~~~")

print("\t\t phno: 1234567891,9876543210 ")

ch='y'

while ch=='y':

print("\t\t [Link] LOGIN ")


print("\t\t 2. ADMIN LOGIN ")

print("\t\t 3. EXIT ")

print("Do You Want To Login As :")

ch=int(input("enter the choice (1 or 2 or 3) :"))

if ch==1:

print("\t\tWELCOME TO URBAN EATS")

print("\t\t~~~~~~~~~~~~~~~~~~~")

while True:

Orders()

break

elif ch==2:

print("\t\t__________________________________________")

print("\t\t FOOD PORTAL MANAGENT SYSTEM - CUSTOMER &


ADMIN ")

print("\t\t__________________________________________")

print("\t\t Urban Eats ")

print("\t\t ~~~~~~~~~~~~~~~~~~~~~~~")

print("\t\t phno: 1234567891,9876543210")

print("\t\t 1. ADD FOOD ")


print("\t\t 2. UPDATE FOOD")

print("\t\t 3. DELETE FOOD")

print("\t\t 4. VIEW CUSTOMERS ")

print("\t\t 5. EXIT ")

ch=int(input("enter the choice (1 or 2 or 3 or 4 or 5) :"))

if ch==1:

print("\t\t [Link] FOOD ")

add_food()

elif ch==2:

print("\t\t [Link] FOOD")

update_food()

elif ch==3:

print("\t\t 3. DELETE FOOD ")

delete_food()

elif ch==4:

print("\t\t 4. VIEW CUSTOMERS ")

view_orders()

elif ch==5:

print("\t\t 5. EXIT ")

print("THANK YOU......")

break

if ch==3:

print("THANK YOU......")

break

ch=input("do you want to go Main Menu:")


#Food_Items

#Orders_List
#Customer Login
#Admin Login & Adding Food

#Updating Food
#Deleting Food

#Displaying Customer Details


# Exist

You might also like