0% found this document useful (0 votes)
839 views50 pages

Online Shopping Report

This document summarizes a mini project report on an Online Shopping Management System. The project was completed by two students, Ranjith S and Shashank H G, to fulfill the requirements for their fifth semester Bachelor of Engineering degree in Computer Science and Engineering. It describes the objectives of creating an online shopping system for an existing shop to allow customers to purchase products online. The system was developed using PHP, HTML, CSS, Java, and MySQL database.

Uploaded by

yashodha prvn
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)
839 views50 pages

Online Shopping Report

This document summarizes a mini project report on an Online Shopping Management System. The project was completed by two students, Ranjith S and Shashank H G, to fulfill the requirements for their fifth semester Bachelor of Engineering degree in Computer Science and Engineering. It describes the objectives of creating an online shopping system for an existing shop to allow customers to purchase products online. The system was developed using PHP, HTML, CSS, Java, and MySQL database.

Uploaded by

yashodha prvn
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
You are on page 1/ 50

ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

VISVESVARAYA TECHNOLOGY UNIVERSITY JNANA SANGAMA,


BELGAVI - 590014

MINI PROJECT REPORT

ON

“ONLINE SHOPPING MANAGEMENT SYSTEM”


Submitted in partial fulfilment for the requirement of 5th semester for the
Degree of Bachelor of Engineering in

COMPUTER SCIENCE & ENGINEERING

For the Academic Year 2021-22

SUBMITTED BY:
RANJITH S [1DB19CS118]

SHASHANK H G [1DB19CS130]

Under the guidance of:


Mrs. Parvathi C
Mrs. Shruthi G
Assistant Professor,
Dept of CSE, DBIT
ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

DON BOSCO INSTITUTE OF TECHNOLOGY

Kumbalagodu, Bengaluru-560074

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


CERTIFICATE

This is to certify that the Project Report entitled “ONLINE SHOPPING MANAGEMENT
SYSTEM” is a bonifide Project work carried out by RANJITH S (1DB19CS118) and
SHASHANK H G(1DB19CS130), in partial fulfilment of 5th semester for the Degree of
Bachelor of Engineering in Computer Science and Engineering of Visvesvaraya Technological
University, Belagavi, during the academic year 2021-22. It is certified that all
corrections/suggestions indicated for Internal Assessments have been incorporated with the
degree mentioned.

Signature of Guide Signature of Guide Signature of HOD

Mrs. Parvati C Mrs. Shruthi G Prof. B.S UMASHANKAR


Associate Professor, Assistant Professor, Professor & Head,
Dept of CSE , Dept of CSE , Dept of CSE ,
DBIT, Bengaluru. DBIT, Bengaluru. DBIT, Bengaluru. .

External Viva

Name of the Examiners Signature with Date

1. _______________

2. ______________
ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

DON BOSCO INSTITUTE OF TECHNOLOGY


Kumbalagodu, Bengaluru -560074

DECLARATION

We, RANJITH S and SHASHANK H G, student of fifth semester B.E, Department of


Computer Science and Engineering, Don Bosco Institute of Technology, Kumbalagodu,
Bengaluru, declare, that the Project Work entitled “ONLINE SHOPPING MANAGEMENT
SYSTEM” has been carried out by and submitted in partial fulfilment of the requirement of 5th
semester Aug 2021-Jan 2022. The matter embodied in this report has been submitted to any
university or institute for the award of any other degree or diploma.

Place: Bangalore RANJITH S [1DB19CS118]

Date: SHASHANK H G [1DB19CS130]


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

ACKNOWLEDGEMENT

At the various stages in making the mini project, a number of people have given me invaluable
comment on the manuscript. I take this opportunity to express my deepest gratitude and
appreciation to all those who helped me directly or indirectly towards the successful completion
of this project.

I would like to thank our Principal Dr . HEMADRI NAIDU T, Don Bosco Institute of
Technology for his support though out this project.

I express my whole hearted gratitude to Prof. B.S. UMASHANKAR, who is our respectable
Head of Dept. of Computer Science. I wish to acknowledge for his valuable help and
encouragement.

In this regard I owe a heartfelt gratitude to my guide MrS., Assistant Professor of Department
of Computer Science and Engineering, for his timely advice on the project and regular
assistance throughout the project work. I would also like to thank the teaching and non-teaching
staff members of Department of Computer Science and Engineering for their corporation.
ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

ABSTRACT

An online shopping system that permits a customer to submit online orders for items and/or
services from a store that serves both walk-in customers and online customers. The online
shopping system presents an online display of an order cut off time and an associated delivery
window for items selected by the customer. The system accepts the customer's submission of a
purchase order for the item in response to a time of submission being before the order cut off
time. The online shopping system does not settle with a credit supplier of the customer until the
item selected by the customer is picked from inventory but before it is delivered. Therefore, the
customer can go online and make changes to the order. In addition, available service windows
are presented to the customer as a function of customer selected order and service types and
further

This project is developed using PHP and HTML language Java, CSS and MYSQL use for
database connection. Creating and managing requirements is a challenge of IT, systems and
product development projects or indeed for any activity where you have to manage a
contractual relationship. Organization need to effectively define and manage requirements to
ensure they are meeting needs of the customer, while proving compliance and staying on the
schedule and within budget. The project analyzes the system requirements and then comes up
with the requirements specifications. It studies other related systems and then come up with
system specifications. The system is then designed in accordance with specifications to satisfy
the requirements.
ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

TABLE OF CONTENT

INTRODUCTION
PAGE
1.1 PROJECT OBJECTIVES 1

1.2 PROJECT OVER VIEW 2

1.3 PROJECT SCOPE 2

1.4 STUDY OF SYSTEMS 3

1.4.1 MODULES 3

1.4.1.1 ADMIN 3

1.4.1.2 MODERATOR 11

1.4.1.3 USER 12

2 . SYSTEM ANALYSIS 15

2.1 EXISTING SYSTEM 15

2.2 PROPOSED SYSTEM 16

2.3 SYSTEM REQURIMENT 16


SPECIFICATION
2.3.1 GENERAL DESCRIPTION 16

2.3.2 SYSTEM OBJECTIVE 17

2.3.3 SYSTEM REQURIMENT 17

2.3.3.1 NON FUNCTIONAL REQURIMENT 18

2.3.3.2 FUNCTIONAL REQURIMENT 19

3.SYSTEM DESIGN 23

3.1 INPUT AND OUTPUT DESIGN 24

3.1.1 INPUT DESIGN 24


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

3.1.2 OUTPUT DESIGN 24

3.2 DATABASE 25
3.3 SYSTEM TOOLS 25

3.3.1 FRONT END 26

3.3.2 BACK END 27

3.4 TABLES 28

3.5 E-R DIAGRAM 30

3.6 DATA FLOW DIAGRAMS(DFD) 32

3.7 SCREEN SHOTS 39

3.8 SAMPLE CODE 47

4.CONCLUSION 67

REFERENCES 69
ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT
ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

CHAPTER 1

INTRODUCTION

This project is a web based shopping system for an existing shop. The project objective is to
deliver the online shopping application into android platform.

Online shopping is the process whereby consumers directly buy goods or services from a seller
in real-time, without an intermediary service, over the Internet. It is a form of electronic
commerce. This project is an attempt to provide the advantages of online shopping to customers
of a real shop. It helps buying the products in the shop anywhere through internet by using an
android device. Thus the customer will get the service of online shopping and home delivery
from his favourite shop

1.1 PROJECT OBJECTIVE:

The objective of the project is to make an application in android platform to purchase items in
an existing shop. In order to build such an application complete web support need to be
provided. A complete and efficient web application which can provide the online shopping
experience is the basic objective of the project. The web application can be implemented in the
form of an android application with web view.

1.2 PROJECT OVER VIEW:

The central concept of the application is to allow the customer to shop virtually using the
Internet and allow customers to buy the items and articles of their desire from the store. The
information pertaining to the products are stores on an RDBMS at the server side (store).

The Server process the customers and the items are shipped to the address submitted by them.
The application was designed into two modules first is for the customers who wish to buy the
articles. Second is for the storekeepers who maintains and updates the information pertaining to
the articles and those of the customers. The end user of this product is a departmental store
where the application is hosted on the web and the administrator maintains the database. The

DEPT, CSE, DBIT, BANGALORE. 1


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

application which is deployed at the customer database, the details of the items are brought
forward from the database for the customer view based on the selection through the menu and
the database of all the products are updated at the end of each transaction. Data entry into the
application can be done through various screens designed for various levels of users. Once the
authorized personnel feed the relevant data into the system, several reports could be generated
as per the security.

1.3 PROJECT SCOPE:


This system can be implemented to any shop in the locality or to multinational branded shops
having retail outlet chains. The system recommends a facility to accept the orders 24*7 and a
home delivery system which can make customers happy.

If shops are providing an online portal where their customers can enjoy easy shopping from
anywhere, the shops won’t be losing any more customers to the trending online shops such as
flip cart or eBay. Since the application is available in the Smartphone it is easily accessible and
always available.

1.4 STUDY OF THE SYSTEM

1.4.1 MODULES:

The system after careful analysis has been identified to be presented with the following modules
and roles.

The modules involved are:

 Administrator

 Moderators

 Users

1.4.1.1 ADMINISTRATOR:
The administrator is the super user of this application. Only admin have access into this admin
page. Admin may be the owner of the shop. The administrator has all the information about all
the users and about all products.

DEPT, CSE, DBIT, BANGALORE. 2


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

This module is divided into different sub-modules.

1. Manage Moderators

2. Manage Products

3. Manage Users

4. Manage Orders

 Add Moderator

Only admin is having the privilege to add a moderator. A moderator can be considered as a staff
who manages the orders or owner of a group of products.

 Block moderator
Admin can restrict a moderator from managing the orders by blocking them. Admin can
unblock a blocked user if needed.

 Remove Moderator

Admin has privilege to delete a moderator who was added.

 Search moderator:

All existing moderators can be viewed by the administrator as a list. If there is number of
moderators and admin need to find one of them, the admin can search for a moderator by name.

DEPT, CSE, DBIT, BANGALORE. 3


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

MANAGE PRODUCTS

Fig 1.3: Manage Products

 Add Products

The shopping cart project contains different kind of products. The products can be classified
into different categories by name. Admin can add new products into the existing system with all
its details including an image.

 Delete Products

Administrator can delete the products based on the stock of that particular product.

 Search products
Admin will have a list view of all the existing products. He can also search for a particular
product by name.

MANAGE USER

 View Users

The admin will have a list view of all the users registered in the system.

Admin can view all the details of each user in the list except password.

 Add Users

Admin has privileges to add a user directly by providing the details.

 Delete &Block Users

Administrator has a right to delete or block a user. The default status of a new user registered is
set as blocked. The admin must accept the new user by unblocking him.

DEPT, CSE, DBIT, BANGALORE. 4


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

 VIEW ORDER
Administrator can view the Orders which is generated by the users. He can verify the details of
the purchase.

 Delete order

Admin can delete order from the orders list when the product is taken for delivery.

1.4.1.2 MODERATORS

A moderator is considered as a staff who can manage orders for the time being. As a future
update moderator may give facility to add and manage his own products. Moderators can
reduce the work load of admin. Now moderator has all the privilege and admin having except
managing other moderators. He can add products and users. He can also check the orders and
edit his profile.

 Manage products

 Manage users

 Manage orders

1.4.1.2 Registration
A new user will have to register in the system by providing essential details in order to view the
products in the system. The admin must accept a new user by unblocking him.

Login

A user must login with his user name and password to the system after registration.

 View Products

User can view the list of products based on their names after successful login. A detailed
description of a particular product with product name, products details, product image, price
can be viewed by users.

DEPT, CSE, DBIT, BANGALORE. 5


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

 Search Product

Users can search for a particular product in the list by name.

 Add to cart:

The user can add the desired product into his cart by clicking add to cart option on the product.

He can view his cart by clicking on the cart button. All products added by cart can be viewed in
the cart. User can remove an item from the cart by clicking remove

 Submit Cart:

After confirming the items in the cart the user can submit the cart by providing a delivery
address. On successful submitting the cart will become empty.

 History

In the history the user will have a view of pending orders

 Edit Profile

The user can view and edit the profile

DEPT, CSE, DBIT, BANGALORE. 6


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

CHAPTER 2

SYSTEM ANALYSIS
System analysis is the process of gathering and interpreting facts, diagnosing problems
and using the information to recommend improvements on the system. System analysis is
a problem solving activity that requires intensive communication between the system users and
system developers.

System analysis or study is an important phase of any system development process. The system
is viewed as a whole, the inputs are identified and the system is subjected to close study to
identify the problem areas. The solutions are given as a proposal. The proposal is reviewed
on user request and suitable changes are made. This loop ends as soon as the user is satisfied
with the proposal.

2.1 EXISTING SYSTEM

The current system for shopping is to visit the shop manually and from the available product
choose the item customer want and buying the item by payment of the price of the item .

It is less user-friendly.
1. User must go to shop and select products.

2. It is difficult to identify the required product.

3. Description of the product limited.

4. It is a time consuming process

5. Not in reach of distant users.

2.2 PROPOSED SYSTEM

In the proposed system customer need not go to the shop for buying the products. He can order
the product he wish to buy through the application in his Smartphone. The shop owner will be
admin of the system. Shop owner can appoint moderators who will help owner in managing .

DEPT, CSE, DBIT, BANGALORE. 7


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

2.3 SYSTEM REQUIREMENT SPECIFICATION

2.3.1 GENERAL DESCRIPTION


Product Description:

The system consists of two parts .A web application which can provide the online shopping
service and an android application for the customer to access the web service from his
Smartphone. Web application should be able to help the customer for selecting his item and to
help the owner in managing the orders from the customers.

Problem Statement:

As online shopping became a trend nowadays the regular shops are losing their customers
to online brands. Customers have effortless shopping experience and saving time through
shopping online. For competing with those online brands, If shops are providing an online
portal where their customers can shop through internet and get the products at their doors it
will increase the number of customers.

2.3.2 SYSTEM OBJECTIVES


 To provide an android application for online shopping of products in an existing shop.

 To provide a online shopping web site for the same shop.

2.3.3 SYSTEM REQUIREMENTS


2.3.3.1 NON FUNCTIONAL REQUIREMENTS

1.EFFICIENCY REQUIREMENT

When an online shopping cart android application implemented customer can purchase product
in an efficient manner.

DEPT, CSE, DBIT, BANGALORE. 8


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

2.RELIABILITY REQUIREMENT

The system should provide a reliable environment to both customers and owner. All orders should
be reaching at the admin without any errors.

USABILITY REQUIREMENT

The android application is designed for user friendly environment and ease of use.

I. IMPLEMENTATION REQUIREMENT

Implementation of the system using css and html in front end with jsp as back end and it will be
used for database connectivity. And the database part is developed by mysql. Responsive web
designing is used for making the website compatible for any type of screen.

II. DELIVERY REQUIREMENT

The whole system is expected to be delivered in four months of time with a weekly evaluation by
the project guide.

DEPT, CSE, DBIT, BANGALORE. 9


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

2.3.3.2 FUNCTIONAL REQUIREMENTS

USER

USER LOGIN

Description of feature

This feature used by the user to login into system. A user must login with his user name and
password to the system after registration. If they are invalid, the user not allowed to enter the
system.

Functional requirement

- Username and password will be provided after user registration is confirmed.

- Password should be hidden from others while typing it in the field .

REGISTER NEW USER

Description of feature
A new user will have to register in the system by providing essential details in order to view the

products in the system. The admin must accept a new user by unblocking him.

Functional requirement

- System must be able to verify and validate information.

- The system must encrypt the password of the customer to provide security.

Description of feature

The user can add the desired product into his cart by clicking add to cart option on the product.
He can view his cart by clicking on the cart button. All products added by cart can be viewed in
the cart. User can remove an item from the cart by clicking remove. After confirming the items

DEPT, CSE, DBIT, BANGALORE. 10


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

in the cart the user can submit the cart by providing a delivery address. On successful
submitting the cart will become empty.

Functional requirement

- System must ensure that, only a registered customer can purchase items.

ADMIN

 MANAGE USER

Description of feature

The administrator can add user, delete user, view user and block user.

 MANAGE MODERATOR

Description of feature

The administrator can add moderator, delete moderator, block moderator and search for a
moderator.

 MANAGE PRODUCTS

Description of feature

The administrator can add product, delete product and view product.

 MANAGE ORDERS

Description of feature

The administrator can view orders and delete orders.

DEPT, CSE, DBIT, BANGALORE. 11


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

Functional requirements

-The system must identify the login of the admin.


-Admin account should be secured so that only owner of the shop can access that account

MODERATOR

Description of features

A moderator is considered as a staff who can manage orders for the time being. As a future
update moderator may give facility to add and manage his own products. Moderators can
reduce the work load of admin. Now moderator has all the privilege of an admin having except
managing other moderators. He can manage users and manage products. He can also check the
orders and edit his profile.

Functional requirement

-The system must identify the login of a moderator.

DEPT, CSE, DBIT, BANGALORE. 12


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

CHAPTER 3

SYSTEM DESIGN
System design is the solution for the creation of a new system.

This phase focuses on the detailed implementation of the feasible system. It emphasis on
translating design. Specifications to performance specification. System design has two phases
of development

 Logical design

 Physical design

During logical design phase the analyst describes inputs (sources), output s(destinations),
databases (data sores) and procedures (data flows) all in a format that meets the user
requirements. The analyst also specifies the needs of the user at a level that virtually
determines the information flow in and out of the system and the data resources. Here the
logical design is done through data flow diagrams and database design. The physical design is
followed by physical design or coding. Physical design produces the working system by
defining the design specifications, which specify

Exactly what the candidate system must do. The programmers write the necessary programs
that accept input from the user, perform necessary processing on accepted data and produce the
required report on a hard copy or display it on the screen.

3.1 INPUT AND OUTPUT DESIGN

3.1.1 INPUT DESIGN:

Input design is the link that ties the information system into the world of its

Users. The input design involves determining the inputs, validating the data, minimizing the
data entry and provides a multi-user facility. Inaccurate inputs are the most common cause of
errors in data processing. Errors entered by the data entry operators can be controlled by input
design. The user-originated inputs are converted to a computer based format in the input design.

DEPT, CSE, DBIT, BANGALORE. 13


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

Input data are collected and organized into groups of similar data. Once identified, the
appropriate input media are selected for processing. All the input data are validated and if any
data violates any conditions, the user is warned by a message. If the data satisfies all the
conditions, it is transferred to the appropriate tables in the database. In this project the student
details are to be entered at the time of registration. A page is designed for this purpose which is
user friendly and easy to use. The design is done such that users get appropriate messages
when exceptions occur.

3.1.2 OUTPUT DESIGN:


Computer output is the most important and direct source of information to the user. Output
design is a very important phase since the output needs to be in an efficient manner. Efficient
and intelligible output design improves the system relationship with the user and helps in
decision making. Allowing the user to view the sample screen is important because the user is
the ultimate judge of the quality of output. The output module of this system is the selected
notifications.

3.2 DATABASE

DATABASE DESIGN:

Databases are the storehouses of data used in the software systems. The data is stored in tables
inside the database. Several tables are created for the manipulation of the data for the
system. Two essential settings for a database are

- the field that is unique for all the record occurrences.

-the field used to set relation between tables.

Normalization is a technique to avoid redundancy in the tables.

3.3 SYSTEM TOOLS

The various system tools that have been used in developing both the front end and the back end
of the project are being discussed in this chapter.

DEPT, CSE, DBIT, BANGALORE. 14


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

3.3.1. FRONT END:

JSP, HTML, CSS, JAVA SCRIPT, ANDROID are utilized to implement the frontend.

Java Server Pages (JSP)

Different pages in the applications are designed using jsp. A Java Server Pages component is a
type of Java servlet that is designed to fulfil the role of a user interface for a Java web
application. Web developers write JSPs as text files that combine HTML or XHTML code,
XML elements, and embedded JSP actions and commands. Using JSP, one can collect input
from users through web page.

HTML (Hyper Text Mark-up Language)

HTML is a syntax used to format a text document on the web.

CSS (Cascading Style Sheets)

CSS is a style sheet language used for describing the look and formatting of a document
written in a markup language.

DEPT, CSE, DBIT, BANGALORE. 15


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

ER Diagram

DEPT, CSE, DBIT, BANGALORE. 16


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

Java Script

JS is a dynamic computer programming language. It is most commonly used as part of web


browsers, whose implementations allow client-side scripts to interact with the user, control
the browser, communicate asynchronously, and alter the document content that is displayed.

Java Script is used to create pop up windows displaying different alerts in the system like “User
registered successfully”, ”Product added to cart” etc.

Android

The application is delivered to customer through an android application.

So android platform is used to develop the user application.

3.3.2 BACK END

The back end is implemented using MySQL which is used to design the databases.

MySQL

MySQL is the world's second most widely used open-source relational database
management system (RDBMS). The SQL phrase stands for Structured Query Language.

An application software called Navigate was used to design the tables in MySQL.

PROCESS

A process shows a transformation or manipulation of data flow within the system. The symbol
used is an oval shape.

DEPT, CSE, DBIT, BANGALORE. 17


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

Snap short

 Loginpage

Figure : Login page.

 Online Shop

Figure: Online shopping front page.

DEPT, CSE, DBIT, BANGALORE. 18


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

Figure: Electronic page

Figure: Your cart Page

DEPT, CSE, DBIT, BANGALORE. 19


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

Figure:Register page

DEPT, CSE, DBIT, BANGALORE. 20


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

SOURCE CODE

<?php

include "db.php";

session_start();

#Login script is begin here

#If user given credential matches successfully with the data available in database then we
will echo string login_success

#login_success string will go back to called Anonymous funtion $("#login").click()

if(isset($_POST["email"]) && isset($_POST["password"])){

$email = mysqli_real_escape_string($con,$_POST["email"]);

$password = $_POST["password"];

$sql = "SELECT * FROM user_info WHERE email = '$email' AND password =


'$password'";

$run_query = mysqli_query($con,$sql);

$count = mysqli_num_rows($run_query);

$row = mysqli_fetch_array($run_query);

$_SESSION["uid"] = $row["user_id"];

$_SESSION["name"] = $row["first_name"];

$ip_add = getenv("REMOTE_ADDR");

//we have created a cookie in login_form.php page so if that cookie is available means user
is not login

//if user record is available in database then $count will be equal to 1

if($count == 1){

DEPT, CSE, DBIT, BANGALORE. 21


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

if (isset($_COOKIE["product_list"])) {

$p_list = stripcslashes($_COOKIE["product_list"]);

//here we are decoding stored json product list cookie to normal array

$product_list = json_decode($p_list,true);

for ($i=0; $i < count($product_list); $i++) {

//After getting user id from database here we are checking user cart item if there is
already product is listed or not

$verify_cart = "SELECT id FROM cart WHERE user_id = $_SESSION[uid] AND p_id =


".$product_list[$i];

$result = mysqli_query($con,$verify_cart);

if(mysqli_num_rows($result) < 1){

//if user is adding first time product into cart we will update user_id into database table
with valid id

$update_cart = "UPDATE cart SET user_id = '$_SESSION[uid]' WHERE ip_add =


'$ip_add' AND user_id = -1";

mysqli_query($con,$update_cart);

}else{

//if already that product is available into database table we will delete that record

$delete_existing_product = "DELETE FROM cart WHERE user_id = -1 AND ip_add =


'$ip_add' AND p_id = ".$product_list[$i];

mysqli_query($con,$delete_existing_product);

//here we are destroying user cookie

setcookie("product_list","",strtotime("-1 day"),"/");

//if user is logging from after cart page we will send cart_login

echo "cart_login";

exit();

DEPT, CSE, DBIT, BANGALORE. 22


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

//if user is login from page we will send login_success

echo "login_success";

$BackToMyPage = $_SERVER['HTTP_REFERER'];

if(!isset($BackToMyPage)) {

header('Location: '.$BackToMyPage);

echo"<script type='text/javascript'>

</script>";

} else {

header('Location: index.php'); // default page

exit;

}else{

$email = mysqli_real_escape_string($con,$_POST["email"]);

$password =md5($_POST["password"]) ;

$sql = "SELECT * FROM admin_info WHERE admin_email = '$email' AND


admin_password = '$password'";

$run_query = mysqli_query($con,$sql);

$count = mysqli_num_rows($run_query);

//if user record is available in database then $count will be equal to 1

if($count == 1){

$row = mysqli_fetch_array($run_query);

$_SESSION["uid"] = $row["admin_id"];

$_SESSION["name"] = $row["admin_name"];

DEPT, CSE, DBIT, BANGALORE. 23


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

$ip_add = getenv("REMOTE_ADDR");

//we have created a cookie in login_form.php page so if that cookie is available means user
is not login

//if user is login from page we will send login_success

echo "login_success";

echo "<script> location.href='admin/add_product.php'; </script>";

exit;

}else{

echo "<span style='color:red;'>Please register before login..!</span>";

exit();

HEADER
<?php

session_start();

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

DEPT, CSE, DBIT, BANGALORE. 24


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<!-- The above 3 meta tags *must* come first in the head; any other head content must
come *after* these tags -->

<title>Online Shopping</title>

<!-- Google font -->

<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500,700"
rel="stylesheet">

<!-- Bootstrap -->

<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css"/>

<!-- Slick -->

<link type="text/css" rel="stylesheet" href="css/slick.css"/>

<link type="text/css" rel="stylesheet" href="css/slick-theme.css"/>

<!-- nouislider -->

<link type="text/css" rel="stylesheet" href="css/nouislider.min.css"/>

<!-- Font Awesome Icon -->

<link rel="stylesheet" href="css/font-awesome.min.css">

<!-- Custom stlylesheet -->

<link type="text/css" rel="stylesheet" href="css/style.css"/>

<link type="text/css" rel="stylesheet" href="css/accountbtn.css"/>

DEPT, CSE, DBIT, BANGALORE. 25


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
-->

<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

<!--[if lt IE 9]>

<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>

<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>

<![endif]-->

<style>

#navigation {

background: #FF4E50; /* fallback for old browsers */

background: -webkit-linear-gradient(to right, #F9D423, #FF4E50); /* Chrome 10-25,


Safari 5.1-6 */

background: linear-gradient(to right, #F9D423, #FF4E50); /* W3C, IE 10+/ Edge, Firefox


16+, Chrome 26+, Opera 12+, Safari 7+ */

#header {

background: #780206; /* fallback for old browsers */

background: -webkit-linear-gradient(to right, #061161, #780206); /* Chrome 10-25,


Safari 5.1-6 */

background: linear-gradient(to right, #061161, #780206); /* W3C, IE 10+/ Edge, Firefox


16+, Chrome 26+, Opera 12+, Safari 7+ */

#top-header {

DEPT, CSE, DBIT, BANGALORE. 26


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

background: #870000; /* fallback for old browsers */

background: -webkit-linear-gradient(to right, #190A05, #870000); /* Chrome 10-25,


Safari 5.1-6 */

background: linear-gradient(to right, #190A05, #870000); /* W3C, IE 10+/ Edge, Firefox


16+, Chrome 26+, Opera 12+, Safari 7+ */

#footer {

background: #7474BF; /* fallback for old browsers */

background: -webkit-linear-gradient(to right, #348AC7, #7474BF); /* Chrome 10-25,


Safari 5.1-6 */

background: linear-gradient(to right, #348AC7, #7474BF); /* W3C, IE 10+/ Edge, Firefox


16+, Chrome 26+, Opera 12+, Safari 7+ */

color: #1E1F29;

#bottom-footer {

background: #7474BF; /* fallback for old browsers */

background: -webkit-linear-gradient(to right, #348AC7, #7474BF); /* Chrome 10-25,


Safari 5.1-6 */

background: linear-gradient(to right, #348AC7, #7474BF); /* W3C, IE 10+/ Edge, Firefox


16+, Chrome 26+, Opera 12+, Safari 7+ */

.footer-links li a {

color: #1E1F29;

DEPT, CSE, DBIT, BANGALORE. 27


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

.mainn-raised {

margin: -7px 0px 0px;

border-radius: 6px;

box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px
10px -5px rgba(0, 0, 0, 0.2);

.glyphicon{

display: inline-block;

font: normal normal normal 14px/1 FontAwesome;

font-size: inherit;

text-rendering: auto;

-webkit-font-smoothing: antialiased;

-moz-osx-font-smoothing: grayscale;

.glyphicon-chevron-left:before{

content:"\f053"

.glyphicon-chevron-right:before{

content:"\f054"

</style>

</head>

<body>

DEPT, CSE, DBIT, BANGALORE. 28


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<!-- HEADER -->

<header>

<!-- TOP HEADER -->

<div id="top-header">

<div class="container">

<ul class="header-links pull-left">

<li><a href="#"><i class="fa fa-phone"></i> +91-8884823379</a></li>

<li><a href="#"><i class="fa fa-envelope-o"></i> [email protected]</a></li>

<li><a href="#"><i class="fa fa-map-marker"></i>Bangalore</a></li>

</ul>

<ul class="header-links pull-right">

<li><a href="#"><i class="fa fa-inr"></i> INR</a></li>

<li><?php

include "db.php";

if(isset($_SESSION["uid"])){

$sql = "SELECT first_name FROM user_info WHERE user_id='$_SESSION[uid]'";

$query = mysqli_query($con,$sql);

$row=mysqli_fetch_array($query);

echo '

<div class="dropdownn">

<a href="#" class="dropdownn" data-toggle="modal" data-target="#myModal" ><i


class="fa fa-user-o"></i> HI '.$row["first_name"].'</a>

<div class="dropdownn-content">

<a href="" data-toggle="modal" data-target="#profile"><i class="fa fa-user-circle"


aria-hidden="true" ></i>My Profile</a>

<a href="logout.php" ><i class="fa fa-sign-in" aria-hidden="true"></i>Log out</a>

DEPT, CSE, DBIT, BANGALORE. 29


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

</div>

</div>';

}else{

echo '

<div class="dropdownn">

<a href="#" class="dropdownn" data-toggle="modal" data-target="#myModal" ><i


class="fa fa-user-o"></i> My Account</a>

<div class="dropdownn-content">

<a href="" data-toggle="modal" data-target="#Modal_login"><i class="fa fa-sign-in"


aria-hidden="true" ></i>Login</a>

<a href="" data-toggle="modal" data-target="#Modal_register"><i class="fa fa-user-


plus" aria-hidden="true"></i>Register</a>

</div>

</div>';

?>

</li>

</ul>

</div>

</div>

<!-- /TOP HEADER -->

DEPT, CSE, DBIT, BANGALORE. 30


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<!-- MAIN HEADER -->

<div id="header">

<!-- container -->

<div class="container">

<!-- row -->

<div class="row">

<!-- LOGO -->

<div class="col-md-3">

<div class="header-logo">

<a href="#" class="logo">

<font style="font-style:normal; font-size: 33px;color: aliceblue;font-family: serif">

Online Shop

</font>

</a>

</div>

</div>

<!-- /LOGO -->

<!-- SEARCH BAR -->

<div class="col-md-6">

<div class="header-search">

<form>

<select class="input-select">

<option value="0">All Categories</option>

<option value="1">Men</option>

<option value="1">Women </option>

DEPT, CSE, DBIT, BANGALORE. 31


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

</select>

<input class="input" id="search" type="text" placeholder="Search here">

<button type="submit" id="search_btn" class="search-btn">Search</button>

</form>

</div>

</div>

<!-- /SEARCH BAR -->

<!-- ACCOUNT -->

<div class="col-md-3 clearfix">

<div class="header-ctn">

<!-- Cart -->

<div class="dropdown">

<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">

<i class="fa fa-shopping-cart"></i>

<span>Your Cart</span>

<div class="badge qty">0</div>

</a>

<div class="cart-dropdown" >

<div class="cart-list" id="cart_product">

</div>

<div class="cart-btns">

DEPT, CSE, DBIT, BANGALORE. 32


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<a href="cart.php" style="width:100%;"><i class="fa fa-edit"></i> edit cart</a>

</div>

</div>

</div>

<!-- /Cart -->

<!-- Menu Toogle -->

<div class="menu-toggle">

<a href="#">

<i class="fa fa-bars"></i>

<span>Menu</span>

</a>

</div>

<!-- /Menu Toogle -->

</div>

</div>

<!-- /ACCOUNT -->

</div>

<!-- row -->

</div>

<!-- container -->

</div>

<!-- /MAIN HEADER -->

</header>

<!-- /HEADER -->

DEPT, CSE, DBIT, BANGALORE. 33


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<nav id='navigation'>

<!-- container -->

<div class="container" id="get_category_home">

</div>

<!-- responsive-nav -->

<!-- /container -->

</nav>

<!-- NAVIGATION -->

<div class="modal fade" id="Modal_login" role="dialog">

<div class="modal-dialog">

<!-- Modal content-->

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>

<div class="modal-body">

<?php

include "login_form.php";

?>

DEPT, CSE, DBIT, BANGALORE. 34


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

</div>

</div>

</div>

</div>

<div class="modal fade" id="Modal_register" role="dialog">

<div class="modal-dialog" style="">

<!-- Modal content-->

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>

<div class="modal-body">

<?php

include "register_form.php";

?>

</div>

</div>

</div>

</div>

DEPT, CSE, DBIT, BANGALORE. 35


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

FOOTER

<footer id="footer">

<!-- top footer -->

<div class="section">

<!-- container -->

<div class="container">

<!-- row -->

<div class="row">

<div class="col-md-3 col-xs-6">

<div class="footer">

<h3 class="footer-title">About Us</h3>

<p>This is my Small Database Management System mini project</p>

<ul class="footer-links">

<li><a href="#"><i class="fa fa-map-marker"></i>Bangalore ,Kumbalagodu</a></li>

<li><a href="#"><i class="fa fa-phone"></i>+91-8884823379</a></li>

<li><a href="#"><i class="fa fa-envelope-o"></i>[email protected]</a></li>

</ul>

</div>

</div>

<div class="col-md-6 text-center" style="margin-top:80px;">

<ul class="footer-payments">

DEPT, CSE, DBIT, BANGALORE. 36


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<li><a href="#"><i class="fa fa-cc-visa"></i></a></li>

<li><a href="#"><i class="fa fa-credit-card"></i></a></li>

<li><a href="#"><i class="fa fa-cc-paypal"></i></a></li>

<li><a href="#"><i class="fa fa-cc-mastercard"></i></a></li>

<li><a href="#"><i class="fa fa-cc-discover"></i></a></li>

<li><a href="#"><i class="fa fa-cc-amex"></i></a></li>

</ul>

<span class="copyright">

<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->

Copyright &copy;<script>document.write(new Date().getFullYear());</script> All rights


reserved | This template is made with <i class="fa fa-heart-o" aria-hidden="true"></i>
by <a href="#" target="_blank">Shashank</a>

<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->

</span>

</div>

<div class="col-md-3 col-xs-6">

<div class="footer">

<h3 class="footer-title">Categories</h3>

<ul class="footer-links">

<li><a href="#">Mobiles</a></li>

<li><a href="#">Men</a></li>

DEPT, CSE, DBIT, BANGALORE. 37


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

<li><a href="#">Women</a></li>

<li><a href="#">Kids</a></li>

<li><a href="#">Accessories</a></li>

</ul>

</div>

</div>

<div class="clearfix visible-xs"></div>

</div>

<!-- /row -->

</div>

<!-- /container -->

</div>

<!-- /top footer -->

<!-- bottom footer -->

<!-- /bottom footer -->

DEPT, CSE, DBIT, BANGALORE. 38


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

</footer>

<script src="js/jquery.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/slick.min.js"></script>

<script src="js/nouislider.min.js"></script>

<script src="js/jquery.zoom.min.js"></script>

<script src="js/main.js"></script>

<script src="js/actions.js"></script>

<script src="js/sweetalert.min"></script>

<script src="js/jquery.payform.min.js" charset="utf-8"></script>

<script src="js/script.js"></script>

<script>var c = 0;

function menu(){

if(c % 2 == 0) {

document.querySelector('.cont_drobpdown_menu').className =
"cont_drobpdown_menu active";

document.querySelector('.cont_icon_trg').className = "cont_icon_trg active";

c++;

}else{

document.querySelector('.cont_drobpdown_menu').className =
"cont_drobpdown_menu disable";

document.querySelector('.cont_icon_trg').className = "cont_icon_trg disable";

DEPT, CSE, DBIT, BANGALORE. 39


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

c++;

</script>

<script type="text/javascript">

$('.block2-btn-addcart').each(function(){

var nameProduct = $(this).parent().parent().parent().find('.block2-name').html();

$(this).on('click', function(){

swal(nameProduct, "is added to cart !", "success");

});

});

$('.block2-btn-addwishlist').each(function(){

var nameProduct = $(this).parent().parent().parent().find('.block2-name').html();

$(this).on('click', function(){

swal(nameProduct, "is added to wishlist !", "success");

});

});

</script>

DEPT, CSE, DBIT, BANGALORE. 40


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

CONCLUSION
The project entitled Online shopping system was completed successfully.

The system has been developed with much care and free of errors and at the same time it is
efficient and less time consuming. The purpose of this project was to develop a web application
and an android application for purchasing items from a shop.

This project helped us in gaining valuable information and practical knowledge on several
topics like designing web pages using html & css, usage of responsive templates, designing of
android applications, and management of database using mysql . The entire system is secured.
Also the project helped us understanding about the development phases of a project and
software development life cycle. We learned how to test different features of a project.

This project has given us great satisfaction in having designed an application which can be
implemented to any nearby shops or branded shops selling various kinds of products by simple
modifications.

DEPT, CSE, DBIT, BANGALORE. 41


ONLINE SHOPPING MANAGEMENT SYSTEM DBMS MINI PROJECT

REFERENCES

[1]JavaScript Enlightenment,Cody Lindley-First Edition, based on JavaScript 1.5, ECMA-262,


Edition

[2]Mc GrawHill’s , Java : The complete reference 7thEdition, Herbert


Schildit

[3]Complete CSS Guide ,Maxine Sherrin and John Allsopp-O'Reilly Media; September 2012

[4]http://www.w3schools.com/html/defualt.asp, http://www.w3schools.com/css/default.asp,
http://www.w3schools.com/js/default.asp

DEPT, CSE, DBIT, BANGALORE. 42

You might also like