Online Cake Shop: Bachelor of Science (Information Technology)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 78

ONLINE CAKE SHOP

A Project Report
Submitted in partial fulfillment of the
Requirements for the award of the degree
of

BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)

BY

Shruti Somprakash Mishra

Under the esteemed guidance

of Prof. Ms. Preeti Sarode

Assistant Professor
DEPARTMENT OF INFORMATION TECHNOLOGY

K.M. AGRAWAL COLLEGE


(Affiliated to the University of Mumbai)
KALYAN,PINCODE :421301
MAHARASHTRA
2023-2024
PROFORMA FOR THE APPROVAL PROJECT PROPOSAL

PNR No: 2021016401260095


Roll no:03
Name of the Student

Shruti Somprakash Mishra

Title of the Project:


Online Cake Shop

Name of the Guide:


Prof. Preeti Sarode

Teaching experience of the Guide

Is this your first Submission? Yes No

Signature of the Student Signature of the Guide


Date: Date:

Signature of the Coordinator


K.M. AGRAWAL COLLEGE
(Affiliated to the University of Mumbai)
KALYAN - MAHARASHTRA - 421301
DEPARTMENT OF INFORMATION TECHNOLOGY

NACC ACCREDITED B++

This is to certify that the project entitled, ―ONLINE CAKE SHOP, is bonafide work of Shruti
S o m p r a k a s h M i s h r a bearing Seat No:( ) submitted in partial fulfillment of the
requirements for the award of degree of BACHELOR OF SCIENCE IN INFORMATION
TECHNOLOGY from University of Mumbai.

Internal Guide Coordinator

External Examiner

Date: College Seal


ABSTRACT

Online Cake Shop this site is made to help the people. It helps peoples to do Cake shop
by staying at their home. It is possible for anybody to order any cake via internet and have the goods
delivered at his/her doorsteps quick and fast. Once an order is placed customer will receive their
order under given time.

Online Cake shop is made for make peoples life easier and happy. Online Cake Shop
provides users Custom cakes with good quality. It provides user to online payment option as
well as cash on delivery. customer will be asked to fill or select shipping address, a shipping
option, and payment information such as debit card. here the peoples get fresh cakes.
ACKNOWLEDGEMENT

This project is not possible without support of my honorable teachers. Firstly, I would
like to thank my project advisor Miss. Preeti Sarode, for guiding me through each and every
step of the process with knowledge and support.
Thank you for your advice, guidance and assistance. I would also like to thank my project
committee members, who showed immense patience andunderstanding throughout the project and
provided suggestions.
Finally, I would like to dedicate this project to my parents and my friends for their love,
encouragement and help throughout the project.
DECLARATION

I hereby declare that the project entitled, ―Online Cake Shop done at place where the
project is done, has not been in any case duplicated to submit to any other university for the award of
anydegree.
To the best of my knowledge other than me, no one has submitted to any other university.
The project is done in partial fulfillment of the requirements for the award of degree of BACHELOR OF
SCIENCE (INFORMATION TECHNOLOGY) to be submitted as final semester project aspart of our
curriculum.

Name and Signature of the Student


TABLE OF CONTENTES

Sr.n Contents Page


o

1 Introduction 9-12
1.1 Objective 9
1.2 Feasibility Study 9
1.3 Objective Study 10
1.4 Purpose 10
1.5 Scope 11
1.6 Advantages 11
1.7 Applicability 12
1.8 Achievements 12
2 Survey of Technology 13-14
3 Requirement and Analysis 15-20
3.1 Problem Definition 15
3.2 Requirement Specification 15
3.3 Planning and Schedule 15
3.4 Event Table 18
4 System Design 19
4.1 Basic Module 20
4.2 Data Design 21
4.3 Logic Diagram 22
4.4 Test Cases 23
5 Implementation and Testing 24-34
5.1 Testing Approach 25-29
5.2 Coding Details and Code Efficiency 30-34
6 Results 35-44
7 Conclusion and Future Work 45-54
7.1 Advantages over Current System 46-49
7.2 Future Enhancement 50-52
7.3 Conclusion 53
7.4 System Maintenance 54
8 References 55
Chapter 1
Introduction

Background
Online Cake Shop is very familiar to everyone; it has simple design that everyone can access it.
There is another option for the user that is add to cart. Where user can add multiple cake items
to cart. At checkout time, the items in the shopping cart will be presented as an order. At that
time, more information will be needed to complete the transaction. Usually, the customer will
be asked to fill or select a billing address, a shipping address, a shipping option, and payment
information such as credit card number.

Online Cake Shop this site is made to help the people. It helps peoples to do shopping by
staying at their home. It is possible for anybody to order any products via internet and have
the goods delivered at his/her doorsteps quick and fast. Once an order is placed customer will
receive their order under given time.

Online Cake Shop is made for make peoples life easier and happy. Online Cake Shop provides
users custom cakes and fresh products. It provides user to online payment option as well as cash
on delivery, here the peoples get fresh products.

Objective

 Providing a simple website for Online Cake Shopping.


 Booking for cakes at home.
 Easy payment system with proper help service.
 Customers will get Fresh cakes by sitting at home.
 Customers will get good quality of products at very low price
 Customer can save money by shop online
 Customer will get good service and returns.
 This store make user to choose freely what he/she want or not it will easily get
without any trouble.

Purpose, Scope, and Applicability


PURPOSE:
This project is made for good purpose; our goal is to provide every facility to people who don’t
want to go outside they want to do shop online by staying at home. Customer can watch and see
everything and choose what products he wants.

Our company will provide fresh cakes and services to our customers. It will save time and
money of customers who shop by this store online

SCOPE:
Time Scope:
Scope of this project is simple and connected to future development with customers and web
development features. We can view the rapid development of computer technology in almost all
field of operation and its use in relation of information management. It is more important to
look out this development also so we designed this who meet up with the demands of the
customers. It will also help in.

 Reduce time waste


 Creating a platform for online purchase and delivery of cakes.
 Advertise other content for general information.
APPLICABILITY:
 Makes managing simple.
 Improve efficiency and saving of time and money.
 Acts as a solid record.
 Make safety.
 Provide free home service with customer satisfaction
 Maintain orders and delivery.
 Awaits avoided.
 Maintain payment system
ACHIEVEMENTS:
By Use of Online Cake Shop Following Are the Benefits Expected

 Online Cake Shop one of the popular website in current time. By this time people are
so much attracted towards online shop and do online shop
 This is quite beneficial for people who don’t want have enough time to go out
for cakes, especially during hectic office hours.
 A local cakes may not be open always 24 *7. But in online store customers can
place their order at any time for home delivery or takeaway, irrespective of the
timings.
 This booking system provides you the flexibility and the easiness to update the
product you want at any time without any compilations.
 By avoiding to shop online you make your time waste, it will save time as well as
money and make more productivity.
 Online Cake Shop comes with many features. One of the important feature is that
it allows you to promote to your store that can attract more customers.
 The basic need of any website is efficiency and simplicity. This website very efficient as
it provides easy browsing & data entry for user. User can easily view all relatedoperation
along with all relevant data. User can view details of pricing without going anywhere.
Chapter 2
Survey of Technologies

PHP:
PHP is an acronym for "PHP: Hypertext Pre-processor‖. It is a widely-used, open source
scripting language. Its scripts are executed on the server. It is free to download and use. It
is powerful enough to be at the core of the biggest blogging system on the web
(WordPress). It is deep enough to run the largest social network (Facebook). It is also easy
enough to be a beginner's first server-side language.

What PHP can do?

 PHP can generate dynamic page content


 PHP can create, open, read, write, delete, and close files on the server
 PHP can collect form data
 PHP can send and receive cookies
 PHP can add, delete, modify data in your database
 PHP can encrypt

data Why PHP?

 PHP is compatible with almost all servers used today (Apache, IIS, etc.
 PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.
 PHP is easy to learn and runs efficiently on the server side
MYSQL: -

MySQL is a fast, easy to use relational database. It is currently the most popular open-source
database. It is very commonly used in conjunction with PHP scripts to create powerful and dynamic server-
side applications.

MySQL is used for many small and big businesses. It is developed, marketed and supported by
MySQL AB, a Swedish company. It is written in C and C++.

Reasons of Popularity:

MySQL is becoming so popular because of these following reasons:

 MySQL is an open-source database so you don't have to pay a single penny to use it.
 MySQL is quicker than other databases so it can work well even with the large data set.
 MySQL supports many operating systems with many languages like PHP, PERL, C, C++,
JAVA, etc.
 MySQL uses a standard form of the well-known SQL data language.
 MySQL is very friendly with PHP, the most popular language for web development.

MYSQL features: -

 Database Mirroring
 Data Partitioning
 Online Indexing Operations
 Fast Recovery
Chapter 3

3.1 Feasibility Study

 The Feasibility study is a major part of this phase, Feasibility Study means selecting thebest
systemthatmeettheperformancerequirement.
 Itisthemeasureofhowbeneficialorpracticalthedevelopmentofan
Information System would be to theorganization.
 Ourstudyofthefeasibledevelopment ofthesoftwareisgoingtobeinterms of
the followingaspects

 Operational Feasibility: -

 The system is easyto use and is verysimple.


 Theproposedsystemwillcostnoharmtothecafe;insteaditwillenhance the result ina better
respect.
 The new system will avoid confusion and resistance by catchingthe user’s attention, as it
is presentable

 Economic Feasibility:-
 Equipment maintenance is also minimum.
 Saving of paper work and manpower reduced.
 Increased customerLoyalty.
 Increased customersatisfaction.
 This will growveryrapidly and economicallyitwill havepositive feedbacks,

 Technical Feasibility: -

 software Requirement is already available in present system Then my project is technical feasible.
 My project is internally feasible as work present equipment current procedure&
existing software.

3.1 Existing System

Existing system is based on manual work and all the process are done manually, so they
maintain registers and files for recording all the details of the system.
They maintain several registers for recording the entry of daily transactions such as billing of the
cakes to the clients, etc.
They maintain the record for their clients so they keep each and every information
regarding their regular clients in the master file. In the similar fashion they maintain the records
of their parties so they keep each and every information regarding their parties in the party
master file.
They keep the bill book or cash book to maintain the record for each sale of
the all groceries or transaction in the ONLINE CAKE SHOP. They also maintain the personal
book for each client for their personal transactions so when the after the month or year when the
client comes for the payment they see the book and make the bill.

Similarly, they maintain the book for their parties so they can pay the money to them
after some time. Thus maintaining party information, client information , party transaction
and all the things are done manually
3.2 Proposed System
 The manual system of ―ONLINE CAKE SHOP‖ is to be computerized in order toovercome
the problems which affects the existing manual system.
 Computerizing the existing system with the help of some programming language,
database package eases the work of the system up to a great extent.
 The main objectives of the proposed system is to help the user. The system can be handy
tothe user in the following reasons: -
 To provide quick and efficient means for performing billing related activities and
to effortlessly generate report of the system.
 To automate the work such as billing, Client record, etc.
 To automate the different types of reports.
CHARACTERSTIC OF THE PROPOSED SYSTEM: -

 Easiness in modification of data :-The proposed system provides managing of huge data
effectively and efficiently for efficient results, storing the details of the customers, employees
etc. in such a way that the database can be modified.
 User friendly:-The proposed system is user friendly because the retrieval and storing of data
is fast and data is maintained efficiently. Moreover, the graphical user interface is provided
in the proposed system, which provides user to deal with the system very easily.
 Reports are easily generated :-Reports can be easily generated in a proposed system. So
any type of reports can be generated in a proposed system, which helps the managers in a
decisions-making activity.
 No or very few paperwork:-The proposed system either does not require paper work or
very few paper works is required. All the data is feted into the computer immediately
andvarious bills and reports can be generated through computers. Since all the data is kept
in a database no data of the organization can be destroyed. Moreover, work becomes very
easy because there is no need to keep data on papers.
 Support strategic competitive advantage :-Proposed system supports strategic competitive
advantages. Since the proposed systems provide easiness in reports generating it will
provide strategic advantages among competitors.
 Computer operator control :- Computer operator control will be there no errors.
Moreover storing and retrieving of information is easy. So work can be done speedily
and in time.
3.2 Functional Specification
Admin:
-  Manage user, seller and admin accounts.
 Add Product and Product categories.
 Update Product and Product categories.
 Delete Product and Product categories.
 User: -
 Search various CAKE items.
 User can add products to cart.
 User can purchase All Type of Cake.
 User can select and order Cakes.
 Payment option by Cash on delivery, credit card, debit card.
3.3 Requirement Analysis

 A Requirement Specification is a structured collection of information that embodies


the requirements of a system.
 This phase of system analysis deals with the requirement needed in the new
 proposed computer system to overcome problems affecting the manual system.
 The owner of the ONLINE CAKE SHOPS wants to computerize the system in such
a way that its billing part should be fully computerize.
 clients and after selling it the bill should be prepared automatically and the total
 amounts as well as the grand total should be calculated.
 Software requirements specification permits a rigorous assessment of requirements
before design can begin and reduces later redesign. It should also provide a realistic basis
for estimating product costs, risks, and schedules.
3.4 : HARDWARE AND SOFTWARE REQUIREMENTS
Software and Hardware Requirements:
Software Requirements:
For the application to run on computer, the device is expected to meet the following system
requirements. The system requirements were categorized into hardware and software
requirements as shown in the tables.
Table 1: Minimum Hardware Requirement
Hardware Minimum Requirement Reason
Processor I 3 Processor Accommodate most PCs
Memory of user PC 512 MB RAM Relatively fast
Disk space of user PC 5 GB Adequate storage capacity Fast
Memory of server PC 8 GB Fast
Bandwidth (Network Connection) 15 Mbps Relatively Good
Disk space of server 200 GB Adequate storage for
database and application

Hardware Requirements:
For the application to run on computer, the device is expected to meet the following system
requirements. The system requirements were categorized into hardware and software
requirements as shown in the tables.
Table 2: Minimum Software Requirements
Software Minimum Requirement Reason
Operating system Window 10 Globally distributed and
for computer widely accessed
Database management system SQL Server 2008 Easy to use and scalable
Browser Opera, Google Chrome IE Standard browser
Planning and Scheduling:

3.6 Gantt Chart:

Project Search
Finalize
Project Requirment of
Project Scheduling of
Project

Gather Information
Built Prototype
Data and program module

System
DesignAll data flow
moduleReport
Designing Project
Coding Module
Testing

system Integration
Systen Testing
Complete Documentation
Install Program

Aug Sep Oct Nov Dec


jan Feb
3.7: Data Flow Diagrams:

A data flow diagram is graphical representation of the ―flow‖ of data through an


information system, Modelling its process aspects. A DFD is often used as a preliminary step to create an
overview of the system without going into great detail, which can later be elaborated. DFDs can also be
used for the visualization of data processing.
A DFD shows what kind of information will be input to and output from the system, how the data
will advance through the system and where the data will be stored.

Symbol Meaning Name


Circles Process

Arrows showing Data Flow


direction of flow

Horizontal pair of lines File

Rectangle box Data source


3.8 : ER Diagram:
The E R diagram shows the relation between the entities. In the above diagram, the above diagram
the entities are Customer, Admin, Product, Payment, Order, Suppliers, Billing Information, Order details.

Admin has the attributes admin_id and password,name. Admin can manage products and user accounts.
Admin can add new products, delete products and update their details. Admin can user by blocking him
or can view profile of all users.
Customer has attributes Customer_id ,Contact,name,password . A Customer can view products, add
products to cart for placing the order, then the order details and order_id is generated. Customer can now
proceed for Payment once the order is placed successfully.In payment section , Payment_id and
Payment details are generated. Customer is managed by Admin.

The symbols used in E-R diagrams are:


SYMBOL PURPOSE

Represents Entity sets.

Represent attributes.

Represent Relationship Sets.


3.9 : Flow Chart:

A flow chart is a type of diagram that represents an algorithm, workflow or process. The
flow chart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows.
This diagrammatically representation illustrate a solution model to a given problem. Flow charts are used
in analyzing, designing, documentation or managing a process or program in various fields.
Chapter 4: System Design

4.1 Basic Modules:

User Sign up:


 Name
 Email ID
 Phone Number
 Password

User Login:
 Customer Phone number
 Customer password

Purchase a product:
 Select product
 Enter the delivery address
 Choose Payment Method
 Order Details
 Order Cancellation

Payment:
 Select the payment method - Credit/Debit/Online Banking/COD
 Card name
 CVV
 Expire
4.2 Schema Design:
4.4 Logical Diagram:

The above logical diagram show activities performed by a Customer. First customer will
search for a product, if he/she found the product then they can start viewing the product related
information. If they are interested in the product, then can start buying the product.
Algorithms Design:
Step 1: Open
Website Step 2:
Signup/Login
Step 3: Search/View the
Product Step 4: Buy the Product
Step 5: Select delivery Address
Step 6: Select Payment method
Step 7: View Order Details
Step 8: Repeat.

User interface design:


A Use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram
defined by and created from a Use-case analysis. Its purpose is to present a graphical overview of
the functionality provided by a system in terms of actors, their goals (represented as use cases),
and any dependencies between those use cases.

An actor is representing a user or another system that will interact with the system you are
modeling. A use case is an external view of the system that represents some action the user might
perform in order to complete a task
4.5 Use-case Diagram

A Use case diagram in the Unified Modeling Language (UML) is a type of


behavioral diagram defined by and created from a Use-case analysis. Its purpose is to
present a graphical overview of the functionality provided by a system in terms of actors,
their goals (represented as use cases), and any dependencies between those use cases.
The main purpose of a use case diagram is to show what system functions are performed
for which actor. A use case shows interaction between a user and a system. A use case
diagram displays the relationship among actors and use cases. The two main components
of a use case diagram are use
Cases and actors.
4.6 Activity Diagram:

For User
For Admin:
4.7 Sequence Diagram:
4.8 Tables
Signup:

Column Name Data Type Allow null Primary Key


firstname Varchar(50) no no
lastname Varchar(50) no no
username Varchar(50) no no
password Varchar(50) no no
contactno Varchar(50) no no
address Varchar(MAX) no no

User Registration:
Name Type Null/Not Null Key

Name Varchar(30) Not Null -

Cake Varchar(20) Not Null pk

Password Varchar(30) Not Null -

Email Varchar(50) Not Null -

Admin Table:
Name Type Null/Not Null Key

ID Int(12) Not Null Unique

Name Varchar(20) Not Null -

Cake Varchar(20) Not Null pk

Password Varchar(30) Not Null pk


Cart:

Column Name Data Type Allow null Primary Key


uname Varchar(250) no no
phone Varchar(100) no no
pname Varchar(250) no no
pid int(50) no no
path Varchar(250) no no
qty Int(30) no No

price Bight (200)

Payment:

Column Name Data Type Allow null Primary Key


Name Varchar(50) no yes
Phone Varchar(50) no no
Card no Varchar(50) no no
Pmethod Varchar(50) no no
Pid int no No

Order Table:
Name NULL / NOTNULL TYPE KEY

Id Null Varchar (10)

Name Not Null Varchar(200)

Cake Not Null Varchar(20)


Product Description Not Null Varchar(100)

Product Prize Not Null Varchar(200)

Product Seller Not Null Varchar(200)

Product Image Not Null Varchar(100)

Product Folder Not Null Varchar(20)

Product Quantity Not Null Varchar(200)

Order ID Not Null Varchar(100)

Order Day Not Null Int(100)

Order Month Not Null Varchar(100)

Order Year Not Null Varchar(100)

Delivery Date Not Null Int(100)

Delivery Month Not Null Varchar(50)

Delivery Year Not Null Int(50)

Customer ID Not Null Int(100) Pk


Screen Layout With Coding
Home Page

Code:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Grocery Shop | Home</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font- awesome/4.7.0/css/font-
awesome.min.css">
<script
src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></scrip
t>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="outer white-text center-align">
<?php include("header.php");?>
<h4 style="font-family:Agency FB">SWEETS, SMOOTHIES & ICE CREAM</h4>
<div>
<img src="crazy.gif" alt="" width="350px" height="200px;">
</div>
<h3 style="font-family:Script MT;">This is the one where we let<br> ourselves go
wild!</h3>
</div>
<!-- Our menu -->

<div class="outer-menu blue lighten-1 white-text">


<h3 class="center-align" style="font-family:Script MT;">Our menu</h3>
<div class="row">
<div class="col l3 m6 s12 center-align">
<img src="menu-img\cake.png" alt="cake">
<h4 style="font-family:Script MT;">Cakes</h4>
<p>Very very tasty and yummy cake for pastry lover.</p>
<a href="search.php?pname=cake" class="btn custom">View Now</a>
</div>
<div class="col l3 m6 s12 center-align">
<img src="menu-img\lady-finger.png" alt="cake">
<h4 style="font-family:Script MT;">Lady Fingers</h4>
<p>yummy lady finger in varous flavor for finger lover.</p>
<a href="search.php?pname=cookie" class="btn custom">View Now</a>
</div>
<div class="col l3 m6 s12 center-align">
<img src="menu-img\cup-cake.png" alt="cake">
<h4 style="font-family:Script MT;">Macaroons</h4>
<p>Sweet cookies for in different flavor for cookie lover.</p>
<a href="search.php?pname=cookie" class="btn custom">View Now</a>
</div>
<div class="col l3 m6 s12 center-align">
<img src="menu-img\fruit-pizza.png" alt="cake">
<h4 style="font-family:Script MT;">Fruit Pizza</h4>
<p>chocolate flavor pastry in different flavor for the pastry lover.</p>
<a href="search.php?pname=pastry" class="btn custom">View Now</a>
</div>
</div>
<div class="row">
<div class="col l3 m6 s12 center-align">
<img src="menu-img\lollypop.png" alt="cake">
<h4 style="font-family:Script MT;">Lollipop</h4>
<p>Yummy Chocolate candy in different flavor for candy lover.</p>
<a href="search.php?pname=lollypop" class="btn custom">View Now</a>
</div>
<div class="col l3 m6 s12 center-align">
<img src="menu-img\donats.png" alt="cake">
<h4 style="font-family:Script MT;">Donuts</h4>
<p>Yummy donuts for donut lover in different flavor.</p>
<a href="search.php?pname=donut" class="btn custom">View Now</a>
</div>
<div class="col l3 m6 s12 center-align">
<img src="menu-img\cookies.png" alt="cake">
<h4 style="font-family:Script MT;">Cookies</h4>
<p>Sweet cookies for in different flavor for cookie lover.</p>
<a href="search.php?pname=cookie" class="btn custom">View Now</a>
</div>
<div class="col l3 m6 s12 center-align">
<img src="menu-img\cheeze-cake.png" alt="cake">
<h4 style="font-family:Script MT;">Cheese cakes</h4>
<p>Chocolate cake pastry for the chocolate lover who loves pastry</p>
<a href="search.php?pname=pastry" class="btn custom">View Now</a>
</div>
</div>
<div class="center-align pink-text" style="background-
image:url('menu- img/inner_colors_03.jpg');background-size:100%
100%;height:500px;">
<div class="inner" style="background-
image:url('menu- img/triangle_gold.png');background-size:100%
100%;width:400px;height:500px;position:relative;margin:auto">
<div style="position:absolute;margin-top:130px;left:90px;color:linear-
gradient(45deg,red,yellow);">
<h2 class="head" style="font-family:Script MT;">Follow Us</h2>
<ul style="font-family:Script MT;">
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-pinterest"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
<?php
include("footer.php");
?>
</body>
</html>
Product Page

Code

<?php
include("db.php");
if(isset($_GET['id']))
{
$id = $_GET['id'];
$qry = mysqli_query($conn,"select * from products where id='$id'");
$data = mysqli_fetch_assoc($qry);
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div class="outer white-text">
<?php
include("header.php");
?>
<div style="padding:50px;">
<h2 style="font-family:Script MT;"><?php echo $data['pname']; ?></h2>
<h5 class="col l6 s12 m6" style="font-family:Agency FB"><?php echo
$data['disc']; ?></h5>
</div>
</div>
<div class="row pink-text" style="background-
image:url('form_background.jpg');margin:0;">
<div class="col l4 s12">
<img src="products/<?php echo $data['image'];?>" alt="image"
style="width:100%;">
</div>
<div class="col l5 s12">
<p style="font-family:Algerian"><?php echo $data['pcategory']; ?></p>
<h3 style="font-family:Script MT;"><?php echo $data['pname']; ?></h3>
<h5>Rs. <?php echo money($data['price']).".00"; ?></h5>
<h5 style="font-family:Agency FB"><?php echo $data['disc']; ?></h5>
<div class="row">
<form action="addtocart.php" method="post">
<input class="col qty l2 browser-default" type="number"
name="qty" min="1" max="10" value="1" id="qty">
<input type="hidden" name="id" value="<?php echo $data['id'];?>">
<input type="submit" name="cart" value="Add To Cart" class="btn custom">
</form>
</div>
<div class="row inner">
<h5 class="head" style="font-family:Script MT;">Share on</h5>
<ul style="font-family:Script MT;">
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-pinterest"></i></a></li>
</ul>
</div>
</div>
</div>

<!-- related products -->

<div class="outer-menu blue lighten-1 white-text">


<h3 class="center-align" style="font-family:Script MT;">Similar Products</h3>
<div class="row">
<?php
$pcategory = $data['pcategory'];
$flavor = $data['flavour'];
$pname = $data['pname'];
$qry = mysqli_query($conn,"select * from products
where pcategory='$pcategory' or flavour='$flavor' limit 4 ");
while($data = mysqli_fetch_assoc($qry))
{
echo '<div class="col l3 center-align">
<img src="products/'.$data['image'].'" alt="cake"
style="width:100%">
<h4 style="font-family:Script MT;">'.$data['pname'].'</h4>
<p>Rs. '.money($data['price']).'.00</p>
<a href="view.php?id='.$data['id'].'" class="btn custom">View
Now</a>
</div>';
}
?>
</div>
</div>
<?php
include("footer.php");
?>

</body>
</html>
Login Page

Code:

<?php

session_start();
error_reporting();

?>

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style2.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/
materialize.min.css">
<!-- Compiled and minified JavaScript -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css"><script
src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></scrip
t>
<style>
</style>
</head>
<body>
<h4 class="center-align">Login Form</h4>

<form action="" method="post">


<div class="imgcontainer">
<img src="https://encrypted- tbn0.gstatic.com/images?
q=tbn:ANd9GcTgGIVZ5z8h6iCFebWvsxzk7_lVfQf9e3PxGI_X52seYwhUkil6NQ" alt="Avatar"
class="responsive-img" style="width:100px;height:100px;border-radius:50%;">
</div>

<div class="container">
<div class="input-field">
<label for="phone">Phone Number</label>
<input type="number" class="phone" name="phone" required>
</div>
<div class="input-field">
<label for="psw">Enter Password</label>
<input type="password" name="password" required>
</div>
<div class="row">
<label>
<input type="checkbox" name="admin" />
<span>Login as Admin</span>
</label>
</div>

<div>
<button type="submit" name="login" class="btn">Login</button>
</div>
</div>

<div class="container" style="background-color:#f1f1f1">


<a href="index.php" class="cancelbtn btn red" >Cancel</a>
<a href="signup.php" class="cancelbtn btn green" >Sign up</a>
<span class="psw">Forgot <a href="forgetpassword.php">password?</a></span>
</div>
</form>

</body>
</html>
<?php
include("db.php");
if(isset($_POST['login']))
{
$phone = $_POST['phone'];
$upass = $_POST['password'];
$admin =
$_POST['admin'];
if($admin=="")
{
//chechink whether the user is registered or not
$user = mysqli_query($conn,"select * from signup where phone='$phone'");
$usercount =
mysqli_num_rows($user);
if($usercount<1)
{
echo '<script>alert("User Not registered");location.href="signup.php";</script>';
}
else
{
$qry = mysqli_query($conn,"select * from signup where phone='$phone' and
upass='$upass'");
$count =
mysqli_num_rows($qry);
if($count==1)
{
$_SESSION['phone'] = $phone;
echo '<script>location.href="index.php";</script>';
}
else
{
echo '<script>alert("Invalid Login");</script>';
}
}
}
else
{
//chechink whether the user is registered or not
$user = mysqli_query($conn,"select * from login where phone='$phone'");
$usercount =
mysqli_num_rows($user);
if($usercount<1)
{
echo '<script>alert("User Not registered");location.href="signup.php";</script>';
}
else
{
$qry = mysqli_query($conn,"select * from login where phone='$phone' and
upass='$upass'");
$count =
mysqli_num_rows($qry);
if($count==1)
{
$countresult = mysqli_fetch_assoc($qry);
$_SESSION['id'] = $countresult['id'];
echo '<script>location.href="index.php";</script>';
}
else
{
echo '<script>alert("Invalid Login");</script>';
}
}
}

?>

Signup Page

Code
<?php
session_start();
error_reporting();
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/
materialize.min.css">
<!-- Compiled and minified JavaScript -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css"><script
src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></scrip
t>

</head>
<style>
</style>
<body>

<form action="" method="post" style="border:1px solid #ccc">


<div class="container">
<h4 class="center-align">Sign Up</h4>
<p>Please fill in this form to create an account.</p>
<hr>
<div class="row">
<div class="col input-field s12 m6 l6">
<label for="fname">First Name</label>
<input type="text" id="fname" name="fname" required>
</div>
<div class="col input-field s12 m6 l6">
<label for="lname">Last Name</label>
<input type="text" id="lname" name="lname" required>
</div>
</div>
<div class="row">
<div class="col input-field s12 m6 l6">
<label for="email">Enter Email</label>
<input type="email" name="email" required>
</div>
<div class="col input-field s12 m6 l6">
<label for="psw">Enter Password</label>
<input type="password" name="password" required>
</div>
</div>
<div class="row">
<div class="col input-field s12 m6 l6">
<label for="phone">Phone</label>
<input type="number" max="9999999999" min="1111111111" class="phone" name="phone"
required >
</div>
<div class="col s12 m6 l6">
<label for="state">State</label>
<div class="input-field col s12">
<select id="country" name="state" required class="browser-default">
<option value="" disabled selected>Choose your option</option>
<option value="Maharashtra">Maharashtra</option>
<option value="Uttar Pradesh">Uttar Pradesh</option>
<option value="Dehli">Dehli</option>
<option value="Manipur">Manipur</option>
<option value="Punjab">Punjab</option>
<option value="Madhya Pradesh">Madhya Pradesh</option>
</select>

</div>
</div>
</div>
<div class="row">
<div class="col input-field s12 m6 l6">
<label for="zcode" class="zcode">Zipcode</label>
<input type="number" max="999999" min="111111" class="option" name="zcode" required>
</div>
<div class="col input-field s12 m6 l6">
<label for="address">Address</label>
<input type="text" id="subject" name="address" required>
</div>
</div>
<div class="row">
<label>
<input type="checkbox" checked="checked" name="remember" style="margin-
bottom:15px"><span>Remember me</span>
</label>
</div>
<div class="row">
<p>By creating an account you agree to our <a href="#" style="color:dodgerblue">Terms
& Privacy</a>.</p>
</div>
<div class="row center-align">
<a href="index.php" class="btn red">Back</a>
<button type="submit" class="btn" name="signup">Sign Up</button>
</div>
<div class="row center-align">
<p style="text-align:center">Or</p>
<a href="login.php" class="btn blue" name="signup" >Login</a>
</div>
</div>
</form>

</body>
</html>

<?php

include("db.php");
if(isset($_POST['signup']))
{
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$pass = $_POST['password'];
$state = $_POST['state'];
$zcode = $_POST['zcode'];
$add = $_POST['address'];
$phone = $_POST['phone'];

$userexistance = mysqli_query($conn,"select * from signup where


phone='$phone'"); if(mysqli_num_rows($userexistance)>=1)
{
echo '<script>alert("user already registered");</script>';
}
else
{
$qry = mysqli_query($conn,"insert into signup
values('$fname','$lname','$email','$pass','$state','$zcode','$add','$phone')");
if($qry)
{
echo '<script>location.href="login.php";</script>';
}
else
{
echo '<script>alert("Error");</script>';
}
}

}
?>
My Account Page

Code:

<?php
session_start();
error_reporting();
if(!isset($_SESSION['phone']))
{
header("location:login.php");
}
else
{
include("db.php");
$phone = $_SESSION['phone'];
$qry = mysqli_query($conn,"select * from signup where phone='$phone'");
$qryresult = mysqli_fetch_assoc($qry);
}

?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>User Account</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css"><script
src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></scrip
t>

<script src="main.js"></script>
</head>
<body>
<div class="row outer white-text" style="margin:0;">
<?php
include("header.php");
?>
<div style="padding:50px;">
<h2 style="font-family:Script MT;">My Account</h2>
<h5 class="col l6 s12 m6" style="font-family:Agency FB">Never share your
password with anyone.</h5>
</div>
</div>
<form action="updateuser.php" method="post" style="border:1px solid #ccc">
<div class="container">
<h4 class="center-align" style="font-family:Algerian">MY ACCOUNT</h4>
<hr>
<div class="row" style="font-family:Agency FB;font-size:20px;">
<div class="col s12 m6 l6">
<label for="fname"><b>First Name</b></label>
<input type="text" id="fname" name="fname" placeholder="Your name.." disabled
value="<?php echo $qryresult['fname']; ?>">
</div>
<div class="col s12 m6 l6">
<label for="lname"><b>Last Name</b></label>
<input type="text" id="lname" name="lname" placeholder="Your last name.." disabled
value="<?php echo $qryresult['lname']; ?>">
</div>
</div>
<div class="row">
<div class="col s12 m6 l6">
<label for="email"><b>Email</b></label>
<input type="email" placeholder="Enter Email" name="email" disabled value="<?
php echo $qryresult['email']; ?>">
</div>
<div class="col s12 m6 l6">
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password"
disabled value="<?php echo $qryresult['upass']; ?>">
</div>
</div>
<div class="row">
<div class="col s12 m6 l6">
<label for="phone"><b>Phone</b></label>
<input type="number" max="9999999999" min="1111111111" placeholder="1234567890"
class="phone" name="phone" disabled value="<?php echo $qryresult['phone']; ?>" >
</div>
<div class="col s12 m6 l6">
<label for="state"><b>State</b></label>
<input type="text" name="state" id="" disabled value="<?php echo
$qryresult['state']; ?>">
</div>
</div>
<div class="row">
<div class="col s12 m6 l6">
<label for="zcode" class="zcode"><b>Zipcode</b></label>
<input type="number" max="999999" min="111111" placeholder="123456" class="option"
name="zcode" disabled value="<?php echo $qryresult['zipcode']; ?>">
</div>
<div class="col s12 m6 l6">
<label for="address"><b>Address</b></label>
<input type="text" id="subject" name="address" placeholder="Enter Address" disabled
value="<?php echo $qryresult['address']; ?>">
</div>
</div>
<div class="row">
<label>
<input type="checkbox" checked="checked" name="remember" style="margin-
bottom:15px"><span>Remember me</span>
</label>
</div>
<div class="row">
<p>By creating an account you agree to our <a href="#" style="color:dodgerblue">Terms
& Privacy</a>.</p>
</div>
<div class="row center-align">
<a href="index.php" class="btn red"
style="text-
decoration:none;color:#fff;bottom:10px;">Back</a>
<button type="submit" class="btn" name="signup">Update</button>
</div>
</div>
</form>
</body>
</html>
My Cart Page:

Code

<?php

session_start();
include("db.php");

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>My Cart</title>
</head>
<body>
<div class="outer row white-text">
<?php
include("header.php");
?>
<div style="padding:50px;">
<h2 style="font-family:Script MT;">My Cart</h2>
<h5 class="col l6 s12 m6" style="font-family:Agency FB">Looking for the original
and best high-protein smoothie on the planet? You've found us! Oh, and we also sell ice
cream.</h5>
</div>
</div>
<div class="row">
<h3 class="l6 m6 s12 center-align" style="font-
family:Algerian;width:50%;padding:50px;margin:20px auto;border-bottom:1px solid
#bbb">My Cart</h3>
<?php

//user details
$phone = $_SESSION['phone'];
$details = mysqli_query($conn,"select * from signup where phone =
'$phone'"); if($details){
$detailsresult = mysqli_fetch_assoc($details);
$name = $detailsresult['fname'];
}
$qry = mysqli_query($conn,"select * from cart where phone='$phone'");
if(mysqli_num_rows($qry)>=1)
{
while($d = mysqli_fetch_assoc($qry))
{
echo '<div style="width:50%;margin:10px auto;border-bottom:1px solid #bbb;">
<div class="row">
<div class="col l3 m3 s12">
<img src="products/'.$d['image'].'" alt="first
image" class="responsive-img" style="width:100%;">
</div>
<div class="col l8 m4 s12">
<a href="view.php?id='.$d['id'].'" class="grey-
text">'.$d['pname'].'</a>
<p class="green-text">Rs. '.money($d['price']).'.00</p>
<form action="updateqty.php?id='.$d['id'].'" method="post">
<input type="submit" value="-" name="operator" class="btn">
<input type="number" value="'.$d['qty'].'" name="qty"
style="width:100px;" class="center-align">
<input type="submit" value="+" name="operator" class="btn">
</form>
<div class="row right-align">
<form action="deletecart.php?id='.$d['id'].'" method="post">
<input type="submit" value="Delete" name="delete"
class="btn">
<a href="index.php" class="btn red">Continue
Shopping</a>
</form>
</div>
</div>
</div></div>';
}
echo '<div class="row l5 right-align" style="margin:auto;width:40%;">
<a href="buy.php" class="btn green">Buy Now</a>
</div>';
}
else
{
echo '<div style="width:40%;margin:auto;">
<div class="col card-panel l12 m6 s12">
<h5 class="center-align" style="font-family:Agency FB">Cart Is Empty<h5>
<div class="right-align">
<a href="index.php" class="btn custom">Continue Shopping</a>
</div>
</div>
</div>';
}

?>
</div>

<?php

include "footer.php";

?>

</body>
</html>
Checkout Page:

Code:

<?php
session_start();
include("db.php");
if(isset($_SESSION['phone']))
{
$phone = $_SESSION['phone'];
//$id = $_GET['id'];
$qry = mysqli_query($conn,"select * from cart where
phone='$phone'"); if($qry)
{
//user details

$details = mysqli_query($conn,"select * from signup where phone='$phone'");


if($details){
$detailsresult = mysqli_fetch_assoc($details);
$name = $detailsresult['fname'];
}
$qry = mysqli_query($conn,"select * from cart where phone='$phone'");
$total = mysqli_query($conn,"select sum(qty*price) AS 'total' from cart where
phone='$phone'");
$totalresult = mysqli_fetch_assoc($total);
$tnum = mysqli_num_rows($qry);
$result = $totalresult['total'];

//user address details


$add = mysqli_query($conn,"select * from signup where phone='$phone'");
$totalproduct = mysqli_num_rows($add);
$addresult = mysqli_fetch_assoc($add);
}
else
{
echo '<script>alert("No Product found");location.href="index.php";</script>';
}
}
else
{
echo '<script>location.href="login.php";</script>';
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Buy</title>
</head>
<body>
<div class="row outer white-text" style="margin:0;">
<?php
include("header.php");
?>
<div style="padding:50px;">
<h2 style="font-family:Script MT;">Checkout</h2>
<h5 class="col l6 s12 m6" style="font-family:Agency FB">Baking is about multi-
tasking. If you are organized and prepared, that's half the battle.</h5>
</div>
</div>
<div class="row" style="background-image:url('form_background.jpg')">
<div class="row col l8">
<div class="col l12" style="font-family:Script MT;padding:20px 50px;">
<h4 class="center-align" style="font-family:Algerian">Delivery Address</h4>
<h6><?php echo $addresult['fname']." ".$addresult['lname'];?></h6>
<h6><?php echo $addresult['address'].", ".$addresult['state'].", ".
$addresult['zipcode'];?></h6>
<h6><?php echo $addresult['phone'];?></h6>
</div>
<div class="col l12">
<h4 class="center-align" style="font-family:Algerian;margin-bottom:20px;">My
Cart</h4>
<?php
while($d = mysqli_fetch_assoc($qry))
{
echo '<div class="row" style="font-family:Agency FB;margin:0;">
<div class="col l3 m3 s12">
<img src="products/'.$d['image'].'" alt="first
image" class="responsive-img" style="object-fit:contain;width:100%;">
</div>
<div class="col l8 m4 s12">
<a style="font-size:22px;" class="black-text"
href="view.php?id='.$d['id'].'">'.$d['pname'].'</a>
<p class="green-text">Rs. '.money($d['price']).'.00</p>
<p>Qty - '.$d['qty'].'</p>
</div>
</div>';
}

?>
</div>
</div>
<div class="col l4 s12 m4">
<table>
<thead>
<tr>
<th><h4 style="font-family:Algerian">Price Details</h4></th>
</tr>
</thead>
<tbody style="font-family:Agency FB;font-size:20px;">
<tr>
<td>Price(<?php echo $tnum; ?>)</td>
<td>Rs. <?php echo money($result).".00"; ?></td>
</tr>
<tr>
<td>Delivery Charges</td>
<td>Free</td>
</tr>
<tr>
<td>Total</td>
<td>Rs. <?php echo money($result).".00"; ?></td>
</tr>
</tbody>
</table>
<div class="col l12" style="margin:40px 0px;">
<form action="payment.php" method="post">
<input type="submit" name="submit" class="btn custom" value="Continue
Payment">
</form>
</div>

</div>
</div>
</body>
</html>

Order Summary Page

Code:

<?php
session_start();
include("db.php");
if(!isset($_SESSION['phone']))
{
header("index.php");
}
else
{
include("db.php");
//payment method variable
//$conn = mysqli_connect('localhost','root','','watch');
$pmethod = $_GET['pmethod'];

//product data
$phone = $_SESSION['phone'];
$q = mysqli_query($conn,"select * from cart where phone='$phone'");
$r = mysqli_num_rows($q);
$cp = mysqli_fetch_assoc($q);
$name = $cp['uname'];//user
name if($r<=0)
{
echo '<script>alert("You dont have any
product!!!");location.href="index.php";</script>';
}
if(isset($_POST['payment']))
{
$qforcart = mysqli_query($conn,"select * from cart where
phone='$phone'"); while($fetchdata = mysqli_fetch_assoc($qforcart))
{
$pid = $fetchdata['id'];
if($_GET['pmethod']=="Through Card")//if card payment is selected
{
$qforexistence = mysqli_query($conn,"select * from payment where phone
= '$phone'");//checking whether the details are already inserted
$card_number = $_POST['cardnumber'];//getting card number

$insertdata = mysqli_query($conn,"insert into


payment values('$name','$phone','$card_number','Through
Card','$pid')");
}
else//if COD is seleected
{
$insertdata = mysqli_query($conn,"insert into payment
values('$name','$phone','0000000000000000','Cash On
Delivery','$pid')");
}
}
$q = mysqli_query($conn,"select * from cart where
phone='$phone'"); while($cp = mysqli_fetch_assoc($q))
{
$month =
array('January','February','March','April','May','June','July','August','September','October
','November','December');
//order date and delivery date calculation
$oid = rand();
$day = date("j");
$month = date("n");
$year = date("Y");
$issue_date = date_create("$day-$month-$year");
$iss_date = date_format($issue_date,"d-m-Y");
$r_date = date_add($issue_date,date_interval_create_from_date_string("2 days"));
$rt_date = date_format($r_date,"d-m-Y");
$id = $cp['id'];
$name = $cp['uname'];
$pname = $cp['pname'];
$path = $cp['image'];
$qty = $cp['qty'];
$price = $cp['price'];
$check = mysqli_query($conn,"INSERT into ordertable
values('$id','$name','$phone','$pname','$price','$path','$qty','$oid','$iss_date','$rt_date'
,'$pmethod')");
}
// for displaying the Address
$q1 = mysqli_query($conn,"select * from signup where phone='$phone' ");
$r1 = mysqli_fetch_assoc($q1);

// for displaying order Details


$order = mysqli_query($conn,"select * from ordertable where phone='$phone'");
$orderresult = mysqli_fetch_assoc($order);

$address = $r1['address'].','.$r1['state'].','.$r1['zipcode'];
}
else
{
header("index.php");
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Final Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-
q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></
script>

<script>
//money function
<?php
function money($money){
$len = strlen($money);
$m = '';
$money =
strrev($money);
for($i=0;$i<$len;$i++){
if(( $i==3 || ($i>3 && ($i-1)%2==0) )&& $i!=$len){
$m .=',';
}
$m .=$money[$i];
}
return strrev($m);
}
?>

</script>
</head>
<body>
<h1 class="text-success text-center my-3">Thank You For Your Order!!!</h1>
<p class="text-center col-10 mx-auto my-4">Your order has been placed and is being
processed.When the item(s) are shipped,you will receive an email with the courier
Tracking ID and the link where you can track your order.Meanwhile ,you can track your
order</p>

<?php

$gt = mysqli_query($conn,"select sum(qty*price) AS gt from cart where phone='$phone'");


$gtresult = mysqli_fetch_assoc($gt);

$p = mysqli_query($conn,"select * from ordertable where id='$id' and phone='$phone'");


$presult = mysqli_fetch_assoc($p);
echo '<div class="row no-gutters p-
4">
<div class="card col-6 p-4">
<h4 class="text-center border-bottom p-2">Order Details</h4>
<p>OrderID<span class="col-6" style="float:right">:'.
$presult['orderid'].'</span></p>
<p>Order Date<span class="col-6" style="float:right">:'.
$presult['b_date'].'</span></p>
<p>Delivery Date<span class="col-6" style="float:right">:'.
$presult['d_date'].'</span></p>
<p>Total Amount<span class="col-6 text-success"
style="float:right">:Rs. '.money($gtresult['gt']).'</span></p>
</div>
<div class="card col-6 p-4">
<h4 class="card-title p-2 border-bottom text-center">Delivery Address</h4>
<div class="card-body">
<p class="p-0 m-0"><b>'.$name.'</b></p>
<p class="p-0 m-0">'.$address.'</p>
<p class="p-0 m-0">Phone - <b>'.$cp['phone'].'</b></p>
<p class="p-0 m-0">Payment Method - <b>'.$pmethod.'</b></p>
</div>
</div>
</div>';
?>
<table border=1 cellpadding=5 cellspacing=5 class="mx-auto my-4 text-center table-xl">
<tr>
<th>Product Description</th>
<th>Expected Shipping Date</th>
<th>Expected Delivery Date</th>
<th>Price</th>
<th>Qty.</th>
<th>Subtotal</th>
</tr>

<?php
$order = mysqli_query($conn,"select * from cart where phone = '$phone'");
while($d = mysqli_fetch_assoc($order))
{
echo "<tr>";
echo "<td>".$d['pname']."</td>";
echo "<td>By ".$presult['b_date']."</td>";
echo "<td>By ".$presult['d_date']."</td>";
echo "<td>Rs.
".money($d['price']).".00</td>";
echo "<td>".$d['qty']."</td>";
echo "<td>Rs. ".money($d['qty']*$d['price']).".00</td>";
echo "</tr>";
}
$gt = mysqli_query($conn,"select sum(qty*price) AS gt from cart where phone='$phone'");
$gtresult = mysqli_fetch_assoc($gt);
?>
<tr><th colspan="7">Grand Total = Rs.<?php echo "
".money($gtresult['gt']).".00";?></th></tr>
</table>
<div class="mx-auto text-center">
<a href="order.php" class="btn btn-info">My Orders</a>
<a href="index.php" class="btn btn-success">Continue Shopping</a>
</div>

</div>
</body>
</html>

<?php
// deleting the cart

$q = mysqli_query($conn,"delete from cart where phone='$phone'");

?>
My Order Page:

Code:

<?php
session_start();
//error_reporting(0);
include("db.php");
?>
<?php
if(!isset($_SESSION['phone']))
{
echo '<script>alert("You need to login!!!");location.href="login.php";</script>';
}
else
{
$phone = $_SESSION['phone'];
$q = mysqli_query($conn,"select * from ordertable where phone='$phone' order by d_date
desc ");
$nor = mysqli_num_rows($q);
// for displaying the Address
$q1 = mysqli_query($conn,"select * from signup where phone='$phone' ");
$r1 = mysqli_fetch_assoc($q1);
$address = $r1['address'].','.$r1['state'].','.$r1['zipcode'];
}
?>
<html>
<head>
<title>My Orders</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">
</head>
<body>
<div class="row outer white-text" style="margin:0;">
<?php
include("header.php");
?>
<div style="padding:50px;">
<h2 style="font-family:Script MT;">My Orders</h2>
<h5 class="col l6 s12 m6" style="font-family:Agency FB">Baking is about multi-
tasking. If you are organized and prepared, that's half the battle.</h5>
</div>
</div>
<div class="row">
<h3 class="h3 l6 m6 s12 center-align" style="font-
family:Algerian;width:50%;padding:10px;margin:20px auto;">My Orders (<?php
echo
$nor;?>)</h3>
<?php
if($nor!=0)
{
while($d = mysqli_fetch_assoc($q))
{
//date difference calculation
$day = date("j");
$month = date("n");
$year = date("Y");
$todays_date = date_create("$day-$month-$year");
$return_date = date_create($d['d_date']);
$diff = date_diff($todays_date,$return_date);
//fromating the date
$charge = $diff->format("%R%a");
echo '<div class="row product" style="font-
family:Agency FB;width:50%;margin:auto;">
<h5 class="text-center bg-danger text-white p-2">Order Details</h5>
<table>
<tr>
<td>OrderID</td>
<td>'.$d['orderid'].'</td>
</tr>
<tr>
<td>Order Date</td>
<td>'.$d['b_date'].'</td>
</tr>
<tr>
<td>Delivery Date</td>
<td>'.$d['d_date'].'</td>
</tr>
<tr>
<td>Total Amount</td>
<td>Rs. '.money($d['price']*$d['qty']).'.00 ('.$d['qty'].' item/s)</td>
</tr>
</table>
</div>';
echo '<div style="font-family:Agency FB;font-
size:20px;width:50%;padding:10px;margin:auto;border-bottom:1px solid
#bbb;" class="product"><div class="row">
<div class="col l3 m3 s12">
<img src="products/'.$d['image'].'" alt="first
image" class="responsive-img" style="width:100%;">
</div>
<div class="col l8 m4 s12">
<a href="view.php?id='.$d['id'].'" class="grey-
text">'.$d['pname'].'</a>
<p class="green-text">Rs. '.money($d['price']).'.00</p>
<p class="grey-text">Qty - '.$d['qty'].'</p>
<div class="row right-align">';
if($charge>"0")
{
echo "<a class='btn red'
href=cancelorder.php?orderid=".$d['orderid']."
id='cancel'>Cancel</a>";
}
echo "<a class='a continue btn'
href=index.php style='margin:auto 5px'>Continue Shopping</a>";
echo '</div></div>
</div>
</div>
</div>';
}
}
else
{
echo '<div style="width:50%;margin:auto;display:block">
<div class="card-panel l5 m6 s12">
<h5 class="center-align">No Orders Yet<h5>
<div class="right-align">
<a href="index.php" class="btn">Order Now</a>
</div>
</div>
</div>';
}
?>
</div>
<?php

include "footer.php";

?>
</body>
</html>
Testing Approach

Testing
Software testing is a critical element of a software quality assurance and represents the
ultimate review of specification, design and coding. Testing is the exposure of the system to trail
input to see whether it produce correct output.

Integration Testing
The first step including integration testing. It need not be the ease, the software whose modules
when run individually and showing perfect results. Will also show results when run as a whole. The
individual modules are clipped under this major module and tested again and verified the results. This is
due to poor interfacing.

Unit Testing
The second step including unit testing. Where in each module is tested to provide its correctness,
validity and also determine any missing operation and to verify whether the objectives have been met.
Errors are noted down and corrected immediately. Unit testing is the important and major part of the
project. So errors are rectified easily in particular modules and program clarity is increased.

Modification and Improvement


In the further development of this website, we will make a review section for the website where the
registered user can read/write the review for a particular product. Along with that we make a rating facility
for the user where they can rate a particular product which can help the customer to select the product
according to the star rating.

Test Cases

A test case in software engineering is a set of conditions or variables under which a tester will
determine whether an application or software system is working correctly or not. Test cases are derived to
ensure that all statements in the program have been executed at least once during and testing and that all
logical conditions have been executed. A test cases is a detailed produced that fully tests a feature or an
aspects of a feature. Whereas the test plan described what, a test case described how to perform a particular
test.
Test Case Expected Result Actual Result Result
Signup page Insert record Insert record pass
login page Go to homepage Go to homepage pass
Homepage Go to product page Go to product page pass
Product page Go to view product page Go to view product page pass
View All page Go to All product page Go to All product page pass
Order summery page Summary of the product Summary of the product pass
Payment page Insert details in database Insert details in database pass
and generate bill and generate bill

ADMIN-SIDE-VALIDATION

Test Case Expected Result Actual Result Result


login page Go to homepage Go to homepage pass
Homepage Go to category page ,users page, Go to category page, users page, pass
order page, card details order page, card details

category page Insert, update, delete and display Insert, update, delete and display pass
records records
TEST USING SELENIUM
Chapter 6
Results and Discussion
Test Report: - As all above test cases, we conclude that the system and all other module are properly
functioning as they are programmed to do.

User can Order any product of their choice with their choice of payment mode. Admin can
manipulate records, Insert, Update, Delete and Display all the product in database. also can view
user details and order details.

Conclusion: - The manual system of ―Online Cake Shop‖ is to be computerized in order to overcome
the problems which affects the existing manual system. Computerizing the existing system with the help
of some programming language, database package eases the work of the system up to a great extent.
The main objectives of the proposed system are to help the user. The system can be handy to the
user in the following reasons: -
 To provide quick and efficient means for performing billing related activities and
to effortlessly generate report of the system.
 To automate the work such as billing, Client record, etc.
 To automate the different types of reports.
Conclusion
An attempt is made in all its earnest towards the successful completion of the project. This system
was verified with valid as well as with invalid data.
This system is user friendly since it has been developed in PHP, a successful GUI environment.
Since the connection can be extended to any database. The control will be more powerful.
Connecting it to any type of database extends the development control. Any suggestions for future
development of the system are welcome.
Upgrading the system can be done without affecting the proper functioning of system.

Future Enhancement:
 This website has only one facility that is cart which is used for multi-product shopping where user can buy
more than one product at same time.
 Further our team goal is to provide a wish list facility to the user where user can save their product for
the future action.
 One more enhancement will be done by our team is that we provide feedback facility regarding the
product, where user can give feedback about the product, like is it good/bad, about their description, color
problem, service facility problem about the product etc.
 Our team will make one more facility to the user/customer where they can give rating to a particular product.

BIBLIOGRAPHY:

For Database:
i. System Analysis and Design –By Sat zinger
ii. Software Engineering—By McGraw Hill 7th
Edition
iii. http://www.w3scools.com/
iv. http://www.phpmanual.com/
v. http://www.google.com/

For PHP:
i. www.google.com www.w3schools.com
ii. http://www.phpmanual.com/
a. http://www.quora.com/

You might also like