ONLINE SHOPPING Both

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 57

A Project Report on

Online Shopping
Submitted in partial fulfillment of Requirements for the award of Degree in

DEPARTMENT OF COMPUTER APPLICATIONS


Of
BENGALURU CITY UNIVERSITY

Submitted by
Thilak Kumar H.L (R1820814)
Shyam Sundar Y (R1820781)

Department of Computer Applications


AIGS, Bengaluru

ACHARYA INSTITUTE OF GRADUATE STUDIES


(NAAC Reaccredited ‘A’ Grade and Affiliated to Bengaluru City University)
1#89/90, Soldevanahalli, Hesaraghatta road, BENGALURU – 560107

2020-2021
A Project Report on
Online Shopping
Submitted in partial fulfillment of Requirements for the award of Degree in

DEPARTMENT OF COMPUTER APPLICATIONS


Of
BENGALURU CITY UNIVERSITY

Submitted by
Thilak Kumar H.L (R1820814)
Shyam Sundar Y (R1820781)

UNDER THE GUIDANCE OF


Mrs. Shridevi
Assistant Professor
Department of Computer Applications
AIGS, Bengaluru

ACHARYA INSTITUTE OF GRADUATE STUDIES


(NAAC Reaccredited ‘A’ Grade and Affiliated to Bengaluru City University)
1#89/90, Soldevanahalli, Hesaraghatta road, BENGALURU – 560107

2020-2021
ACHARYA INSTITUTE OF GRADUATE STUDIES
(NAAC Reaccredited ‘A’ Grade and Affiliated to Bengaluru City University)
Soladevanahalli, Heseraghatta Road, Bengaluru-560107

Department of Computer Applications

UNDERTAKING
Thilak Kumar H.L (R1830814), Shyam Sundar Y (R1820781), studying in 5th Semester BCA at
A.I.G.S hereby undertake that the project has been carried out by us as a part of fulfilment of the
requirements of the award of the degree as prescribed by Bengaluru City University. The project was
carried out at Acharya Institute of Graduate Studies (A.I.G.S) under the guidance of Mrs. Shridevi
This project has not formed the basis for the award of any other degree of Bengaluru City University.

Signature of the students Signature of the guide

1. Thilak Kumar H L (R1820814)

2. Shyam Sundar Y (R1820781)


ACHARYA INSTITUTE OF GRADUATE STUDIES
(NAAC Reaccredited ‘A’ Grade and Affiliated to Bengaluru City University)
Soladevanahalli, Heseraghatta Road, Bengaluru-560107

Department of Computer Applications

CERTIFICATE
This is to certify that the Project entitled

Online Shopping
Submitted in partial fulfilment of the requirement of the degree of
Bachelor of Computer Applications is a result of the bonafide work carried out
by
Thilak Kumar H.L (R1820814)
Shyam Sundar Y (R1820781)
During the academic year 2020-2021
Internal Guide Head of Dept
Mrs. Shridevi P Mr. Ramakrishna. C.N
Assistant Professor HOD
Dept. of Computer Applications Dept. of Computer Applications
AIGS, Bengaluru-560107 AIGS, Bengaluru-560107

Principal Examiner 1: ____________


Dr. Gurunath Rao Vaidya
AIGS, Bengaluru-107 Examiner 2: _____________
ACKNOWLEDGEMENT

Online shopping is a product of our hard work and dedication. We would like to
express our gratitude towards all the people that have helped us and made this project
possible by constantly encouraging and supporting.

We would like to extend our sincere thanks to the principal Dr. Gurunath Rao Vaidya,
Mr. Ramakrishna C N, HOD, Dept. of Computer Applications and our internal guide
Mrs. Shridevi for their continues guidance and support.

We would also like to extend our thanks to all the faculty members of Dept. of Computer
Applications for their support.

At last we are really grateful and offer thanks to our friends and family members for their
support and inspiration.

Student names

1. THILAK KUMAR (R1820814)


2. SHYAM REDDY (R1820781)
CONTENTS

Chapters Page No.

1. Introduction 01

2. Requirement Analysis 03

3. System Analysis 04

3.1 FEASIBILITY STUDY 04


3.2 UML (UNIFIED MODIFY LANGUAGE) 05

4. Technology 10

4.1 My Sql 10

4.2 PHP 11

4.3 Java Script 12

5. System design 15

5.1 ER-Diagram (ERD) 15

5.2 DATA FLOW DIAGRAM 16

6. Coding 17

7. Testing 38

7.1 Black-box (Functional) Testing 38

7.2 White-box (structural) Testing 38


7.3 TESTING PROCESS 40

8. Snapshot 42

9. Conclusion 47

10. Future Enhancement 48

11. Bibliography 49
Online Shopping Page |1

Chapter 1
INTRODUCTION

Online shopping is a web-based application intended to provide automated solution and services to
customer.
Consider a Business organization which have all of its business through INTERNET i.e.,
WEBSITES.
The Business Organization has its offices in few states and normally use courier facility
to deliver the product if possible home delivery is also possible.
This Business Organization mainly has two sectors first one is sale which sale the product to the
customer and second is service which is provided to the customer.

BUSINESS ORGANIZATION

SALE SERVICE

Online shopping provide sales and service to customer by interaction with customer.
The success of a company is mainly based on its satisfied customers, which in turn gives
huge profits.

Retaining existing customers is also an important job of a company. Online shopping


concentrates on the retention of customers by collecting all data from every interaction, every
customer makes with a company from 'all' access points whether they are phone, mail, web or
field. The company can them use this data for specific business purposes viz., marketing, service,
support or sales

Online shopping is basically the collection and distribution of "all" data to "all" areas of
business. The data can then help market the company, help up sell to existing customer,

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |2

understand customers better so that customers can be given better service and allows them to
interact with the company by whatever means they wish.

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |3

Chapter 2
REQUIREMENT ANALYSIS

NEED

In current competitive scenario every business establishment needs quality processes to


increase their efficiency as well as improve their productivity. It is of vital importance that manual,
time consuming & monotonous operations are automated so as to streamline the working of an
organization. Since, the existing system (manual work) takes more time and manpower for
processing. It is keeping in mind this business philosophy (mantra) that we propose an eSHOP.
Our system will deal with all the aspects SALES of Electronics Related Products and SERVICES
after SALES.

MAJOR OBJECTIVES

The main objectives of developing the Online shopping are as given below: -
1. To provide information about various Electronics Products in different category online.
2. Customer can purchase Products Online.
3. Customer can login and get various information about product and can purchase the
suitable product.
4. Customer can pay online, so security is must therefore eSHOP provide secure
transactions.
5. After sale eSHOP also provide after sales service in which customer problem is solved.
6. Data security is maintained to relatively high level by implementing it at Database
level, so as to ensure that only authorized users have access to confidential client information

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |4

Chapter 3
SYSTEM ANALYSIS

System Analysis is a management technique, which helps in designing a new system or


improving an existing system. System Analysis is the process of gathering and interpreting facts,
diagnosing problems (if any), using information to recommend improvements to the system. There
are four basic elements of system analysis: - Output, Input, Files, processes. For computerization
of any system, the existing system must be thoroughly being understood to determine “how the
computer can be best used to make its operation most effective”. This is acquired by analyzing
existing system.

3.1 FEASIBILITY STUDY

Feasibility study is the process of determination of whether or not a project is worth


doing. Feasibility studies are undertaken within tight time constraints and normally culminate in a
written and oral feasibility report. I have taken two weeks in feasibility study with my co-
developer. The contents and recommendations of this feasibility study helped us as a sound basis
for deciding how to proceed the project. It helped in taking decisions such as which software to
use, hardware combinations, etc.
Technical Feasibility
Economical Feasibility
Operational Feasibility

1. Technical Feasibility
Technical feasibility determines whether the work for the project can be done with the
existing equipment, software technology and available personnel. Technical feasibility is
concerned with specifying equipment and software that will satisfy the user requirement.
This project is feasible on technical remarks also, as the proposed system is more
beneficiary in terms of having a sound proof system with new technical components installed on
the system. The proposed system can run on any machines supporting Windows and Internet

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |5

services and works on the best software and hardware that had been used while designing the
system so it would be feasible in all technical terms of feasibility.
2. Economical Feasibility
Economical feasibility determines whether there are sufficient benefits in creating to
make the cost acceptable, or is the cost of the system too high. As this signifies cost-benefit
analysis and savings. On the behalf of the cost-benefit analysis, the proposed system is feasible
and is economical regarding its pre-assumed cost for making a system.
We classified the costs of Online shopping according to the phase in which they
occur. As we know that the system development costs are usually one-time costs that will not
recur after the project has been completed. For calculating the Development costs we evaluated
certain cost categories viz.

1. Personal costs
2. Computer usage
3. Supply and equipments costs
4. Cost of any new computer equipments and software.

3. Operational Feasibility
Operational feasibility criteria measure the urgency of the problem (survey and study
phases) or the acceptability of a solution (selection, acquisition and design phases). How do you
measure operational feasibility? There are two aspects of operational feasibility to be considered:

3.2 UML (UNIFIED MODIFY LANGUAGE)

The Unified Modeling Language (UML) is a standard language for specifying, visualizing,
constructing, and documenting the artifacts of software systems, as well as for business modeling
and other non-software systems. The UML represents a collection of best engineering practices
that have proven successful in the modeling of large and complex systems. The UML is a very
important part of developing object oriented software and the software development process. The
UML uses mostly graphical notations to express the design of software projects. Using the UML
helps project teams communicate, explore potential designs, and validate the architectural design
of the software.

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |6

Goals of UML

The primary goals in the design of the UML were:

1. Provide users with a ready-to-use, expressive visual modeling language so they can develop
and exchange meaningful models.
2. Provide extensibility and specialization mechanisms to extend the core concepts.
3. Be independent of particular programming languages and development processes.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of the OO tools market.
6. Support higher-level development concepts such as collaborations, frameworks, patterns and
components.
7. Integrate best practices.

Why Use UML?

As the strategic value of software increases for many companies, the industry looks for
techniques to automate the production of software and to improve quality and reduce cost and
time-to-market. These techniques include component technology, visual programming, patterns
and frameworks. Businesses also seek techniques to manage the complexity of systems as they
increase in scope and scale. In particular, they recognize the need to solve recurring architectural
problems, such as physical distribution, concurrency, replication, security, load balancing and fault
tolerance. Additionally, the development for the World Wide Web, while making some things
simpler, has exacerbated these architectural problems. The Unified Modeling Language (UML)
was designed to respond to these needs.

UML DIAGRAM TYPES

1. USE CASE

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |7

A use case is a set of scenarios that describing an 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.

An actor is represents 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.

Access The eSHOP Website

Browse Catalog and Search


Item
CUSTOMER

Get Product Information

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |8

Log On to Website
(IF USERD ID IS THERE)

CUSTOMER

If New User Then User Is Authenticated


(New Login ID is made by new User)

SALE

User Login

Buy the Product

Give Shipping Info


CUSTOMER
Give Payment Info

Get Invoice (i.e., Slip)

Get confirmed i.e. Received


Product

Department of Computer Application, AIGS 2020-2021


Online Shopping Page |9

SERVICE

User Login

Enter Product Details

Small Problem

CUSTOMER

Medium Problem

Replace Product

Customer Satisfied

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 10

Chapter 4

Technology

4.1 MySQL
Microsoft SQL Server is a Structured Query Language (SQL) based, client/server relational
database. Each of these terms describes a fundamental part of the architecture of SQL Server.
Database
A database is similar to a data file in that it is a storage place for data. Like a data file, a database
does not present information directly to a user; the user runs an application that accesses data from
the database and presents it to the user in an understandable format.
A database typically has two components: the files holding the physical database and the database
management system (DBMS) software that applications use to access data. The DBMS is
responsible for enforcing the database structure, including:
 Maintaining the relationships between data in the database.
 Ensuring that data is stored correctly and that the rules defining data relationships are not
violated.
 Recovering all data to a point of known consistency in case of system failures.

Relational Database
There are different ways to organize data in a database but relational databases are one of the most
effective. Relational database systems are an application of mathematical set theory to the problem
of effectively organizing data. In a relational database, data is collected into tables (called relations
in relational theory).

When organizing data into tables, you can usually find many different ways to define tables.
Relational database theory defines a process, normalization, which ensures that the set of tables
you define will organize your data effectively.

Client/Server:-

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 11

In a client/server system, the server is a relatively large computer in a central location that
manages a resource used by many people. When individuals need to use the resource, they connect
over the network from their computers, or clients, to the server.
Examples of servers are: In a client/server database architecture, the database files and DBMS
software reside on a server. A communications component is provided so applications can run on
separate clients and communicate to the database server over a network. The SQL Server
communication component also allows communication between an application running on the
server and SQL Server.

Server applications are usually capable of working with several clients at the same time. SQL
Server can work with thousands of client applications simultaneously. The server has features to
prevent the logical problems that occur if a user tries to read or modify data currently being used
by others.

While SQL Server is designed to work as a server in a client/server network, it is also capable of
working as a stand-alone database directly on the client. The scalability and ease-of-use features of
SQL Server allow it to work efficiently on a client without consuming too many resources.
Structured Query Language (SQL)
To work with data in a database, you must use a set of commands and statements (language)
defined by the DBMS software. There are several different languages that can be used with
relational databases; the most common is SQL. Both the American National Standards Institute
(ANSI) and the International Standards Organization (ISO) have defined standards for SQL. Most
modern DBMS products support the Entry Level of SQL-92, the latest SQL standard (published in
1992).

4.2 PHP:

PHP is a general-purpose scripting language especially suited to web development. It was


originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference
implementation is now produced by The PHP Group. PHP originally stood for Personal Home
Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 12

PHP code is usually processed on a web server by a PHP interpreter implemented as a module,
a daemon or as a Common Gateway Interface (CGI) executable. On a web server, the result of the
interpreted and executed PHP code – which may be any type of data, such as generated HTML or
binary image data – would form the whole or part of an HTTP response. Various web template
systems, web content management systems, and web frameworks exist which can be employed to
orchestrate or facilitate the generation of that response. Additionally, PHP can be used for many
programming tasks outside of the web context, such as standalone graphical applications and
robotic drone control. Arbitrary PHP code can also be interpreted and executed via command-line
interface (CLI).

The standard PHP interpreter, powered by the Zend Engine, is free software released under
the PHP License. PHP has been widely ported and can be deployed on most web servers on almost
every operating system and platform, free of charge.

The PHP language evolved without a written formal specification or standard until 2014, with the
original implementation acting as the de facto standard which other implementations aimed to
follow. Since 2014, work has gone on to create a formal PHP specification.

As of January 2021, 72% of PHP websites use discontinued versions of PHP, i.e. PHP 7.2 or
lower, which are no longer supported by The PHP Development Team. A large additional fraction
uses PHP 7.3, which is only (up to December 6, 2021) "supported for critical security issues
only." Over 40% of all PHP websites use version 5.6 or older, that not even Debian supports
(Debian 9 supported version 7.0 and 7.1).

4.3 JAVASCRIPT

JavaScript:

JavaScript is a new scripting language for WebPages. Scripts written with java script can
be embedded into your HTML pages. With java script you have many possibilities for enhancing
your HTML page with interesting elements. For example you are able to respond to user-initiated
events quite easily. Some effects that are now possible with java script were some time ago only
possible with CGI. So you can create really sophisticated pages with the helps of java script on
the Internet.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 13

How can Java Script scripts run?

The first browser to support java script was the Netscape Navigator 2.0 of course the
higher versions do have java script as well. You might know that java does not run on all
Netscape Navigators 2.0 (or higher versions) versions. But this is not true for java script -although
there are some problems with the different versions.
The Mac version for example seems to have many bugs. In the near future there are going
to be some other browsers, which support java script. The Microsoft Internet explorer 3.0 is going
to support java script. JavaScript enabled browsers are going to spread soon - it is worth learning
this new technique now. You might realize that is really easy to write Java Script scripts. We have
to know is some basic techniques and some work-around for problems you might encounter. Of
course we need a basic. Understanding HTML before reading this tutorial you can find many
really good online resources about HTML. Best you make an online search about ‘html’ at yahoo
if you want to get informed about HTML. Now I want to show some small scripts so you can
learn how they are implemented into HTML-documents and to show which possibilities you have
with the new scripting language. The following is a very small script, which will only print a text
into an HTML document.
<html>
<head>
My first JavaScript
</head>
<body><br>
This is a normal HTML document
<br>
<script language=”JavaScript”>
Document.write (“this is a java script”)
</script><b r>
Backing HTML again

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 14

</body>
</html>
If you are using a java script enabled-browser at the moment then you will have the possibility to
see this script working. If your browser doesn’t support Java Script then this output might be some
kind of strange…
This is a normal HTML document
This is java script!
Back in HTML again.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 15

Chapter 5
DESIGN

5.1 ER-Diagram (ERD)

Name Address
PhoneN
o. Cpwd
Emailid
Cid
Get
Business House Ser Ph
vice Address
NO.

Customer

Sol Name
d

Baske
t of

Pno. Number

Pwarra
n Shopping Bucket

Pcateg Products Con


tain
s

Pdetail
pname s
Price

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 16

5.2 DATA FLOW DIAGRAM

Want
Service Default Image Login

Admin Registration Member


Login Default

Payment
Member Place Now
Default Compliment

Place Login Default


Problem Admin

Get Product Product


Service Add Update

Perform Add Update


Searching Company Company View
Service Service Report

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 17

Chapter 6

CODING

Index page
<?php
session_start();
$ip_add = getenv("REMOTE_ADDR");
include "db.php";

if(isset($_POST["categoryhome"])){
$category_query = "SELECT * FROM categories WHERE cat_id!=1";

$run_query = mysqli_query($con,$category_query) or die(mysqli_error($con));


echo "

<!-- responsive-nav -->


<div id='responsive-nav'>
<!-- NAV -->
<ul class='main-nav nav navbar-nav'>
<li class='active'><a href='index.php'>Home</a></li>
<li><a href='store.php'>Electronics</a></li>
";
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$cid = $row["cat_id"];
$cat_name = $row["cat_title"];

$sql = "SELECT COUNT(*) AS count_items FROM products,categories WHERE product_cat=cat_id";


$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
$count=$row["count_items"];

echo "

<li class='categoryhome' cid='$cid'><a href='store.php'>$cat_name</a></li>

";
}

echo "</ul>
<!-- /NAV -->
</div>
<!-- /responsive-nav -->

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 18

";
}
}

if(isset($_POST["page"])){
$sql = "SELECT * FROM products";
$run_query = mysqli_query($con,$sql);
$count = mysqli_num_rows($run_query);
$pageno = ceil($count/2);
for($i=1;$i<=$pageno;$i++){
echo "
<li><a href='#product-row' page='$i' id='page'>$i</a></li>

";
}
}
if(isset($_POST["getProducthome"])){
$limit = 3;
if(isset($_POST["setPage"])){
$pageno = $_POST["pageNumber"];
$start = ($pageno * $limit) - $limit;
}else{
$start = 0;
}
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id LIMIT $start,$limit";
$run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];

$cat_name = $row["cat_title"];
echo "

<div class='product-widget'>
<a href='product.php?p=$pro_id'>
<div class='product-img'>
<img src='product_images/$pro_image' alt=''>
</div>
<div class='product-body'>
<p class='product-category'>$cat_name</p>
<h3 class='product-name'><a href='product.php?p=$pro_id'>$pro_title</a></h3>
<h4 class='product-price'>$pro_price<del class='product-old-price'>$990.00</del></h4>
</div></a>
</div>

";
}
}
}

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 19

if(isset($_POST["gethomeProduct"])){
$limit = 9;
if(isset($_POST["setPage"])){
$pageno = $_POST["pageNumber"];
$start = ($pageno * $limit) - $limit;
}else{
$start = 0;
}

$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEE


N 71 AND 74";
$run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){

while($row = mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];

$cat_name = $row["cat_title"];

echo "

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


<a href='product.php?p=$pro_id'><div class='product'>
<div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
<div class='product-label'>
<span class='sale'>-30%</span>
<span class='new'>NEW</span>
</div>
</div></a>
<div class='product-body'>
<p class='product-category'>$cat_name</p>
<h3 class='product-name header-cart-item-name'><a href='product.php?
p=$pro_id'>$pro_title</a></h3>
<h4 class='product-price header-cart-item-info'>$pro_price<del class='product-old-
price'>$990.00</del></h4>
<div class='product-rating'>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
</div>
<div class='product-btns'>
<button class='add-to-wishlist'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to
wishlist</span></button>
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add t
o compare</span></button>

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 20

<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</


span></button>
</div>
</div>
<div class='add-to-cart'>
<button pid='$pro_id' id='product' class='add-to-cart-btn block2-btn-towishlist' href='#'><i cl
ass='fa fa-shopping-cart'></i> add to cart</button>
</div>
</div>
</div>

";
}
;

if(isset($_POST["get_seleted_Category"]) || isset($_POST["search"])){
if(isset($_POST["get_seleted_Category"])){
$id = $_POST["cat_id"];
$sql = "SELECT * FROM products,categories WHERE product_cat = '$id' AND product_cat=cat_id";
}else {
$keyword = $_POST["keyword"];
$sql = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_keywords LIKE '%
$keyword%'";
}

$run_query = mysqli_query($con,$sql);
while($row=mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
$cat_name = $row["cat_title"];
echo "

<div class='col-md-4 col-xs-6'>


<a href='product.php?p=$pro_id'><div class='product'>
<div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
<div class='product-label'>
<span class='sale'>-30%</span>
<span class='new'>NEW</span>
</div>
</div></a>
<div class='product-body'>
<p class='product-category'>$cat_name</p>
<h3 class='product-name header-cart-item-name'><a href='product.php?
p=$pro_id'>$pro_title</a></h3>

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 21

<h4 class='product-price header-cart-item-info'>$pro_price<del class='product-old-


price'>$990.00</del></h4>
<div class='product-rating'>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
<i class='fa fa-star'></i>
</div>
<div class='product-btns'>
<button class='add-to-wishlist' tabindex='0'><i class='fa fa-heart-o'></i><span class='toolti
pp'>add to wishlist</span></button>
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add t
o compare</span></button>
<button class='quick-view' ><i class='fa fa-eye'></i><span class='tooltipp'>quick view</
span></button>
</div>
</div>
<div class='add-to-cart'>
<button pid='$pro_id' id='product' href='#' tabindex='0' class='add-to-cart-btn'><i class='fa fa
-shopping-cart'></i> add to cart</button>
</div>
</div>
</div>
";
}
}

Admin index page

<?php
session_start();
include("../../db.php");

include "sidenav.php";
include "topheader.php";
include "activitity.php";

?>
<!-- End Navbar -->
<div class="content">
<div class="container-fluid">
<div class="panel-body">
<a>
<?php //success message
if(isset($_POST['success'])) {
$success = $_POST["success"];
echo "<div class='col-md-12 col-xs-12' id='product_msg'>
<div class='alert alert-success'>
<a href='#'' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Product is Added..!</b>
</div>
</div>";
}

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 22

?></a>
</div>
<div class="col-md-14">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title"> Users List</h4>
</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table table-hover tablesorter " id="">
<thead class=" text-primary">
<tr><th>ID</th><th>FirstName</th><th>LastName</th><th>Email</th><th>Password</
th><th>Contact</th><th>Address</th><th>City</th>
</tr></thead>
<tbody>
<?php
$result=mysqli_query($con,"select * from user_info")or die ("query 1 incorrect.....");

while(list($user_id,$first_name,$last_name,$email,$password,$phone,
$address1,$address2)=mysqli_fetch_array($result))
{
echo "<tr><td>$user_id</td><td>$first_name</td><td>$last_name</td><td>$email</
td><td>$password</td><td>$phone</td><td>$address1</td><td>$address2</td>

</tr>";
}
?>
</tbody>
</table>
<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left
: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabi
ndex="0" style="top: 0px; height: 0px;"></div></div></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title"> Categories List</h4>
</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table table-hover tablesorter " id="">
<thead class=" text-primary">
<tr><th>ID</th><th>Categories</th><th>Count</th>
</tr></thead>
<tbody>
<?php
$result=mysqli_query($con,"select * from categories")or die ("query 1 incorrect.....");
$i=1;
while(list($cat_id,$cat_title)=mysqli_fetch_array($result))
{
$sql = "SELECT COUNT(*) AS count_items FROM products WHERE product_cat=$i";
$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 23

$count=$row["count_items"];
$i++;
echo "<tr><td>$cat_id</td><td>$cat_title</td><td>$count</td>

</tr>";
}
?>
</tbody>
</table>
<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left
: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabi
ndex="0" style="top: 0px; height: 0px;"></div></div></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title">Brands List</h4>
</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table table-hover tablesorter " id="">
<thead class=" text-primary">
<tr><th>ID</th><th>Brands</th><th>Count</th>
</tr></thead>
<tbody>
<?php
$result=mysqli_query($con,"select * from brands")or die ("query 1 incorrect.....");
$i=1;
while(list($brand_id,$brand_title)=mysqli_fetch_array($result))
{

$sql = "SELECT COUNT(*) AS count_items FROM products WHERE product_brand=$i";


$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
$count=$row["count_items"];
$i++;
echo "<tr><td>$brand_id</td><td>$brand_title</td><td>$count</td>

</tr>";
}
?>
</tbody>
</table>
<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left
: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabi
ndex="0" style="top: 0px; height: 0px;"></div></div></div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title">Subscribers</h4>

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 24

</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table table-hover tablesorter " id="">
<thead class=" text-primary">
<tr><th>ID</th><th>email</th>
</tr></thead>
<tbody>
<?php
$result=mysqli_query($con,"select * from email_info")or die ("query 1 incorrect.....");

while(list($brand_id,$brand_title)=mysqli_fetch_array($result))
{
echo "<tr><td>$brand_id</td><td>$brand_title</td>

</tr>";
}
?>
</tbody>
</table>
<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left
: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabi
ndex="0" style="top: 0px; height: 0px;"></div></div></div>
</div>
</div>
</div>

</div>
</div>
<?php
include "footer.php";
?>

Profile page

<?php
session_start();
include("./includes/db.php");
if (isset($_POST['re_password']))
{
$email=$_SESSION['admin_email'];

$old_pass = $_POST['old_pass'];
$op = md5($old_pass);
$new_pass = $_POST['new_pass'];
$re_pass = $_POST['re_pass'];
$password_query = mysqli_query($con,"select * from admin_info where admin_email='$email'");
$password_row = mysqli_fetch_array($password_query);
$database_password = $password_row['admin_password'];
if ($database_password == $op)
{
if ($new_pass == $re_pass)

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 25

{
$pass = md5($re_pass);
$update_pwd = mysqli_query($con,"UPDATE admin_info set admin_password='$pass' where admin_id='6'");
echo "<script>alert('Update Sucessfully'); </script>";
}
else
{
echo "<script>alert('Your new and Retype Password is not match'); </script>";
}
}
else
{
echo "<script>alert('Your old password is wrong'); </script>";
}
}

include "sidenav.php";
include "topheader.php";

?>
<!-- End Navbar -->
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-8">
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title">Edit Profile</h4>
<p class="card-category">Complete your profile</p>
</div>
<div class="card-body">
<form method="post" action="profile.php">
<div class="row">
<div class="col-md-5">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">
<?php if (isset($_SESSION['admin_name'])) : ?><?php echo $_SESSION['admin_name']; ?>
<?php endif ?>

</label>
<input type="text" class="form-control" disabled="">
</div>
</div>
<div class="col-md-4">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">enter old password</label>
<input type="text" class="form-control" name="old_pass" id="npwd">
</div>
</div>

<div class="col-md-4">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">Change Password Here</label>
<input type="text" class="form-control" name="new_pass" id="npwd">
</div>

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 26

</div>

<div class="col-md-4">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">confirm Password Here</label>
<input type="text" class="form-control" name="re_pass" id="npwd">
</div>
</div>

<button class="btn btn-primary pull-right" type="submit" name="re_password">Update Profile</button>

<div class="clearfix"></div>
</form>
</div>
</div>
</div>

</div>
</div>
</div>
<?php
include "footer.php";
?>

Database

-- phpMyAdmin SQL Dump


-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 23, 2019 at 07:53 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `ecommerece`
--

DELIMITER $$
--
-- Procedures
--

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 27

CREATE DEFINER=`root`@`localhost` PROCEDURE `getcat` (IN `cid` INT) SELECT * FROM categories WHER
E cat_id=cid$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `admin_info`
--

CREATE TABLE `admin_info` (


`admin_id` int(10) NOT NULL,
`admin_name` varchar(100) NOT NULL,
`admin_email` varchar(300) NOT NULL,
`admin_password` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin_info`
--

INSERT INTO `admin_info` (`admin_id`, `admin_name`, `admin_email`, `admin_password`) VALUES


(1, 'admin', '[email protected]', '25f9e794323b453885f5181f1b624d0b');

-- --------------------------------------------------------

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (


`brand_id` int(100) NOT NULL,
`brand_title` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `brands`
--

INSERT INTO `brands` (`brand_id`, `brand_title`) VALUES


(1, 'HP'),
(2, 'Samsung'),
(3, 'Apple'),
(4, 'motorolla'),
(5, 'LG'),
(6, 'Cloth Brand');

-- --------------------------------------------------------

--
-- Table structure for table `cart`
--

CREATE TABLE `cart` (


`id` int(10) NOT NULL,

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 28

`p_id` int(10) NOT NULL,


`ip_add` varchar(250) NOT NULL,
`user_id` int(10) DEFAULT NULL,
`qty` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cart`
--

INSERT INTO `cart` (`id`, `p_id`, `ip_add`, `user_id`, `qty`) VALUES


(6, 26, '::1', 4, 1),
(9, 10, '::1', 7, 1),
(10, 11, '::1', 7, 1),
(11, 45, '::1', 7, 1),
(44, 5, '::1', 3, 0),
(46, 2, '::1', 3, 0),
(48, 72, '::1', 3, 0),
(49, 60, '::1', 8, 1),
(50, 61, '::1', 8, 1),
(51, 1, '::1', 8, 1),
(52, 5, '::1', 9, 1),
(53, 2, '::1', 14, 1),
(54, 3, '::1', 14, 1),
(55, 5, '::1', 14, 1),
(56, 1, '::1', 9, 1),
(57, 2, '::1', 9, 1),
(71, 61, '127.0.0.1', -1, 1);

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (


`cat_id` int(100) NOT NULL,
`cat_title` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`cat_id`, `cat_title`) VALUES


(1, 'Electronics'),
(2, 'Ladies Wears'),
(3, 'Mens Wear'),
(4, 'Kids Wear'),
(5, 'Furnitures'),
(6, 'Home Appliances'),
(7, 'Electronics Gadgets');

-- --------------------------------------------------------

--

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 29

-- Table structure for table `email_info`


--

CREATE TABLE `email_info` (


`email_id` int(100) NOT NULL,
`email` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `email_info`
--

INSERT INTO `email_info` (`email_id`, `email`) VALUES


(3, '[email protected]'),
(4, '[email protected]'),
(5, '[email protected]');

-- --------------------------------------------------------

--
-- Table structure for table `logs`
--

CREATE TABLE `logs` (


`id` int(11) NOT NULL,
`user_id` varchar(50) NOT NULL,
`action` varchar(50) NOT NULL,
`date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (


`order_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`qty` int(11) NOT NULL,
`trx_id` varchar(255) NOT NULL,
`p_status` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`order_id`, `user_id`, `product_id`, `qty`, `trx_id`, `p_status`) VALUES
(1, 12, 7, 1, '07M47684BS5725041', 'Completed'),
(2, 14, 2, 1, '07M47684BS5725041', 'Completed');

-- --------------------------------------------------------

--

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 30

-- Table structure for table `orders_info`


--

CREATE TABLE `orders_info` (


`order_id` int(10) NOT NULL,
`user_id` int(11) NOT NULL,
`f_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`city` varchar(255) NOT NULL,
`state` varchar(255) NOT NULL,
`zip` int(10) NOT NULL,
`cardname` varchar(255) NOT NULL,
`cardnumber` varchar(20) NOT NULL,
`expdate` varchar(255) NOT NULL,
`prod_count` int(15) DEFAULT NULL,
`total_amt` int(15) DEFAULT NULL,
`cvv` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `orders_info`
--

INSERT INTO `orders_info` (`order_id`, `user_id`, `f_name`, `email`, `address`, `city`, `state`, `zip`, `cardname`, `car
dnumber`, `expdate`, `prod_count`, `total_amt`, `cvv`) VALUES
(1, 12, 'Puneeth', '[email protected]', 'Bangalore, Kumbalagodu, Karnataka', 'Bangalore', 'Karnataka', 560
074, 'pokjhgfcxc', '4321 2345 6788 7654', '12/90', 3, 77000, 1234);

-- --------------------------------------------------------

--
-- Table structure for table `order_products`
--

CREATE TABLE `order_products` (


`order_pro_id` int(10) NOT NULL,
`order_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`qty` int(15) DEFAULT NULL,
`amt` int(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `order_products`
--

INSERT INTO `order_products` (`order_pro_id`, `order_id`, `product_id`, `qty`, `amt`) VALUES


(73, 1, 1, 1, 5000),
(74, 1, 4, 2, 64000),
(75, 1, 8, 1, 40000);

-- --------------------------------------------------------

--
-- Table structure for table `products`

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 31

--

CREATE TABLE `products` (


`product_id` int(100) NOT NULL,
`product_cat` int(100) NOT NULL,
`product_brand` int(100) NOT NULL,
`product_title` varchar(255) NOT NULL,
`product_price` int(100) NOT NULL,
`product_desc` text NOT NULL,
`product_image` text NOT NULL,
`product_keywords` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`product_id`, `product_cat`, `product_brand`, `product_title`, `product_price`, `product_de


sc`, `product_image`, `product_keywords`) VALUES
(1, 1, 2, 'Samsung galaxy s7 edge', 5000, 'Samsung galaxy s7 edge', 'product07.png', 'samsung mobile electronics'),
(2, 1, 3, 'iPhone 5s', 25000, 'iphone 5s', 'http___pluspng.com_img-png_iphone-hd-png-iphone-apple-png-file-550.png',
'mobile iphone apple'),
(3, 1, 3, 'iPad air 2', 30000, 'ipad apple brand', 'da4371ffa192a115f922b1c0dff88193.png', 'apple ipad tablet'),
(4, 1, 3, 'iPhone 6s', 32000, 'Apple iPhone ', 'http___pluspng.com_img-png_iphone-6s-png-iphone-6s-gold-64gb-
1000.png', 'iphone apple mobile'),
(5, 1, 2, 'iPad 2', 10000, 'samsung ipad', 'iPad-air.png', 'ipad tablet samsung'),
(6, 1, 1, 'samsung Laptop r series', 35000, 'samsung Black combination Laptop', 'laptop_PNG5939.png', 'samsung lapt
op '),
(7, 1, 1, 'Laptop Pavillion', 50000, 'Laptop Hp Pavillion', 'laptop_PNG5930.png', 'Laptop Hp Pavillion'),
(8, 1, 4, 'Sony', 40000, 'Sony Mobile', '530201353846AM_635_sony_xperia_z.png', 'sony mobile'),
(9, 1, 3, 'iPhone New', 12000, 'iphone', 'iphone-hd-png-iphone-apple-png-file-550.png', 'iphone apple mobile'),
(10, 2, 6, 'Red Ladies dress', 1000, 'red dress for girls', 'red dress.jpg', 'red dress '),
(11, 2, 6, 'Blue Heave dress', 1200, 'Blue dress', 'images.jpg', 'blue dress cloths'),
(12, 2, 6, 'Ladies Casual Cloths', 1500, 'ladies casual summer two colors pleted', '7475-ladies-casual-dresses-summer-
two-colors-pleated.jpg', 'girl dress cloths casual'),
(13, 2, 6, 'SpringAutumnDress', 1200, 'girls dress', 'Spring-Autumn-Winter-Young-Ladies-Casual-Wool-Dress-
Women-s-One-Piece-Dresse-Dating-Clothes-Medium.jpg_640x640.jpg', 'girl dress'),
(14, 2, 6, 'Casual Dress', 1400, 'girl dress', 'download.jpg', 'ladies cloths girl'),
(15, 2, 6, 'Formal Look', 1500, 'girl dress', 'shutterstock_203611819.jpg', 'ladies wears dress girl'),
(16, 3, 6, 'Sweter for men', 600, '2012-Winter-Sweater-for-Men-for-better-outlook', '2012-Winter-Sweater-for-Men-
for-better-outlook.jpg', 'black sweter cloth winter'),
(17, 3, 6, 'Gents formal', 1000, 'gents formal look', 'gents-formal-250x250.jpg', 'gents wear cloths'),
(19, 3, 6, 'Formal Coat', 3000, 'ad', 'images (1).jpg', 'coat blazer gents'),
(20, 3, 6, 'Mens Sweeter', 1600, 'jg', 'Winter-fashion-men-burst-sweater.png', 'sweeter gents '),
(21, 3, 6, 'T shirt', 800, 'ssds', 'IN-Mens-Apparel-Voodoo-Tiles-09._V333872612_.jpg', 'formal t shirt black'),
(22, 4, 6, 'Yellow T shirt ', 1300, 'yello t shirt with pant', '1.0x0.jpg', 'kids yellow t shirt'),
(23, 4, 6, 'Girls cloths', 1900, 'sadsf', 'GirlsClothing_Widgets.jpg', 'formal kids wear dress'),
(24, 4, 6, 'Blue T shirt', 700, 'g', 'images.jpg', 'kids dress'),
(25, 4, 6, 'Yellow girls dress', 750, 'as', 'images (3).jpg', 'yellow kids dress'),
(27, 4, 6, 'Formal look', 690, 'sd', 'image28.jpg', 'formal kids dress'),
(32, 5, 0, 'Book Shelf', 2500, 'book shelf', 'furniture-book-shelf-250x250.jpg', 'book shelf furniture'),
(33, 6, 2, 'Refrigerator', 35000, 'Refrigerator', 'CT_WM_BTS-BTC-AppliancesHome_20150723.jpg', 'refrigerator sam
sung'),
(34, 6, 4, 'Emergency Light', 1000, 'Emergency Light', 'emergency light.JPG', 'emergency light'),
(35, 6, 0, 'Vaccum Cleaner', 6000, 'Vaccum Cleaner', 'images (2).jpg', 'Vaccum Cleaner'),
(36, 6, 5, 'Iron', 1500, 'gj', 'iron.JPG', 'iron'),

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 32

(37, 6, 5, 'LED TV', 20000, 'LED TV', 'images (4).jpg', 'led tv lg'),
(38, 6, 4, 'Microwave Oven', 3500, 'Microwave Oven', 'images.jpg', 'Microwave Oven'),
(39, 6, 5, 'Mixer Grinder', 2500, 'Mixer Grinder', 'singer-mixer-grinder-mg-46-
medium_4bfa018096c25dec7ba0af40662856ef.jpg', 'Mixer Grinder'),
(40, 2, 6, 'Formal girls dress', 3000, 'Formal girls dress', 'girl-walking.jpg', 'ladies'),
(45, 1, 2, 'Samsung Galaxy Note 3', 10000, '0', 'samsung_galaxy_note3_note3neo.JPG', 'samsung galaxy Note 3 neo'),
(46, 1, 2, 'Samsung Galaxy Note 3', 10000, '', 'samsung_galaxy_note3_note3neo.JPG', 'samsung galxaxy note 3 neo'),
(47, 4, 6, 'Laptop', 650, 'nbk', 'product01.png', 'Dell Laptop'),
(48, 1, 7, 'Headphones', 250, 'Headphones', 'product05.png', 'Headphones Sony'),
(49, 1, 7, 'Headphones', 250, 'Headphones', 'product05.png', 'Headphones Sony'),
(50, 3, 6, 'boys shirts', 350, 'shirts', 'pm1.JPG', 'suit boys shirts'),
(51, 3, 6, 'boys shirts', 270, 'shirts', 'pm2.JPG', 'suit boys shirts'),
(52, 3, 6, 'boys shirts', 453, 'shirts', 'pm3.JPG', 'suit boys shirts'),
(53, 3, 6, 'boys shirts', 220, 'shirts', 'ms1.JPG', 'suit boys shirts'),
(54, 3, 6, 'boys shirts', 290, 'shirts', 'ms2.JPG', 'suit boys shirts'),
(55, 3, 6, 'boys shirts', 259, 'shirts', 'ms3.JPG', 'suit boys shirts'),
(56, 3, 6, 'boys shirts', 299, 'shirts', 'pm7.JPG', 'suit boys shirts'),
(57, 3, 6, 'boys shirts', 260, 'shirts', 'i3.JPG', 'suit boys shirts'),
(58, 3, 6, 'boys shirts', 350, 'shirts', 'pm9.JPG', 'suit boys shirts'),
(59, 3, 6, 'boys shirts', 855, 'shirts', 'a2.JPG', 'suit boys shirts'),
(60, 3, 6, 'boys shirts', 150, 'shirts', 'pm11.JPG', 'suit boys shirts'),
(61, 3, 6, 'boys shirts', 215, 'shirts', 'pm12.JPG', 'suit boys shirts'),
(62, 3, 6, 'boys shirts', 299, 'shirts', 'pm13.JPG', 'suit boys shirts'),
(63, 3, 6, 'boys Jeans Pant', 550, 'Pants', 'pt1.JPG', 'boys Jeans Pant'),
(64, 3, 6, 'boys Jeans Pant', 460, 'pants', 'pt2.JPG', 'boys Jeans Pant'),
(65, 3, 6, 'boys Jeans Pant', 470, 'pants', 'pt3.JPG', 'boys Jeans Pant'),
(66, 3, 6, 'boys Jeans Pant', 480, 'pants', 'pt4.JPG', 'boys Jeans Pant'),
(67, 3, 6, 'boys Jeans Pant', 360, 'pants', 'pt5.JPG', 'boys Jeans Pant'),
(68, 3, 6, 'boys Jeans Pant', 550, 'pants', 'pt6.JPG', 'boys Jeans Pant'),
(69, 3, 6, 'boys Jeans Pant', 390, 'pants', 'pt7.JPG', 'boys Jeans Pant'),
(70, 3, 6, 'boys Jeans Pant', 399, 'pants', 'pt8.JPG', 'boys Jeans Pant'),
(71, 1, 2, 'Samsung galaxy s7', 5000, 'Samsung galaxy s7', 'product07.png', 'samsung mobile electronics'),
(72, 7, 2, 'sony Headphones', 3500, 'sony Headphones', 'product02.png', 'sony Headphones electronics gadgets'),
(73, 7, 2, 'samsung Headphones', 3500, 'samsung Headphones', 'product05.png', 'samsung Headphones electronics gad
gets'),
(74, 1, 1, 'HP i5 laptop', 5500, 'HP i5 laptop', 'product01.png', 'HP i5 laptop electronics'),
(75, 1, 1, 'HP i7 laptop 8gb ram', 5500, 'HP i7 laptop 8gb ram', 'product03.png', 'HP i7 laptop 8gb ram electronics'),
(76, 1, 5, 'sony note 6gb ram', 4500, 'sony note 6gb ram', 'product04.png', 'sony note 6gb ram mobile electronics'),
(77, 1, 4, 'MSV laptop 16gb ram NVIDEA Graphics', 5499, 'MSV laptop 16gb ram', 'product06.png', 'MSV laptop 16g
b ram NVIDEA Graphics electronics'),
(78, 1, 5, 'dell laptop 8gb ram intel integerated Graphics', 4579, 'dell laptop 8gb ram intel integerated Graphics', 'produ
ct08.png', 'dell laptop 8gb ram intel integerated Graphics electronics'),
(79, 7, 2, 'camera with 3D pixels', 2569, 'camera with 3D pixels', 'product09.png', 'camera with 3D pixels camera elect
ronics gadgets'),
(80, 1, 1, 'ytrfdkjsd', 12343, 'sdfhgh', '1542455446_thythtf .jpeg', 'dfgh'),
(81, 4, 6, 'Kids blue dress', 300, 'blue dress', '1543993724_pg4.jpg', 'kids blue dress');

-- --------------------------------------------------------

--
-- Table structure for table `user_info`
--

CREATE TABLE `user_info` (


`user_id` int(10) NOT NULL,
`first_name` varchar(100) NOT NULL,

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 33

`last_name` varchar(100) NOT NULL,


`email` varchar(300) NOT NULL,
`password` varchar(300) NOT NULL,
`mobile` varchar(10) NOT NULL,
`address1` varchar(300) NOT NULL,
`address2` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_info`
--

INSERT INTO `user_info` (`user_id`, `first_name`, `last_name`, `email`, `password`, `mobile`, `address1`, `address2`
) VALUES
(12, 'puneeth', 'Reddy', '[email protected]', 'puneeth', '9448121558', '123456789', 'sdcjns,djc'),
(15, 'hemu', 'ajhgdg', '[email protected]', '346778', '536487276', ',mdnbca', 'asdmhmhvbv'),
(16, 'venky', 'vs', '[email protected]', '1234534', '9877654334', 'snhdgvajfehyfygv', 'asdjbhfkeur'),
(19, 'abhishek', 'bs', '[email protected]', 'asdcsdcc', '9871236534', 'bangalore', 'hassan'),
(21, 'prajval', 'mcta', '[email protected]', '1234545662', '202-555-01', 'bangalore', 'kumbalagodu'),
(22, 'puneeth', 'v', '[email protected]', '1234534', '9877654334', 'snhdgvajfehyfygv', 'asdjbhfkeur'),
(23, 'hemanth', 'reddy', '[email protected]', 'Puneeth@123', '9876543234', 'Bangalore', 'Kumbalagodu'),
(24, 'newuser', 'user', '[email protected]', 'puneeth@123', '9535688928', 'Bangalore', 'Kumbalagodu'),
(25, 'otheruser', 'user', '[email protected]', 'puneeth@123', '9535688928', 'Bangalore', 'Kumbalagodu');

--
-- Triggers `user_info`
--
DELIMITER $$
CREATE TRIGGER `after_user_info_insert` AFTER INSERT ON `user_info` FOR EACH ROW BEGIN
INSERT INTO user_info_backup VALUES(new.user_id,new.first_name,new.last_name,new.email,new.password,ne
w.mobile,new.address1,new.address2);
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `user_info_backup`
--

CREATE TABLE `user_info_backup` (


`user_id` int(10) NOT NULL,
`first_name` varchar(100) NOT NULL,
`last_name` varchar(100) NOT NULL,
`email` varchar(300) NOT NULL,
`password` varchar(300) NOT NULL,
`mobile` varchar(10) NOT NULL,
`address1` varchar(300) NOT NULL,
`address2` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_info_backup`
--

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 34

INSERT INTO `user_info_backup` (`user_id`, `first_name`, `last_name`, `email`, `password`, `mobile`, `address1`, `a
ddress2`) VALUES
(12, 'puneeth', 'Reddy', '[email protected]', '123456789', '9448121558', '123456789', 'sdcjns,djc'),
(14, 'hemanthu', 'reddy', '[email protected]', '123456788', '6526436723', 's,dc wfjvnvn', 'b efhfhvvbr'),
(15, 'hemu', 'ajhgdg', '[email protected]', '346778', '536487276', ',mdnbca', 'asdmhmhvbv'),
(16, 'venky', 'vs', '[email protected]', '1234534', '9877654334', 'snhdgvajfehyfygv', 'asdjbhfkeur'),
(19, 'abhishek', 'bs', '[email protected]', 'asdcsdcc', '9871236534', 'bangalore', 'hassan'),
(20, 'pramod', 'vh', '[email protected]', '124335353', '9767645653', 'ksbdfcdf', 'sjrgrevgsib'),
(21, 'prajval', 'mcta', '[email protected]', '1234545662', '202-555-01', 'bangalore', 'kumbalagodu'),
(22, 'puneeth', 'v', '[email protected]', '1234534', '9877654334', 'snhdgvajfehyfygv', 'asdjbhfkeur'),
(23, 'hemanth', 'reddy', '[email protected]', 'Puneeth@123', '9876543234', 'Bangalore', 'Kumbalagodu'),
(24, 'newuser', 'user', '[email protected]', 'puneeth@123', '9535688928', 'Bangalore', 'Kumbalagodu'),
(25, 'otheruser', 'user', '[email protected]', 'puneeth@123', '9535688928', 'Bangalore', 'Kumbalagodu');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin_info`
--
ALTER TABLE `admin_info`
ADD PRIMARY KEY (`admin_id`);

--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
ADD PRIMARY KEY (`brand_id`);

--
-- Indexes for table `cart`
--
ALTER TABLE `cart`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`cat_id`);

--
-- Indexes for table `email_info`
--
ALTER TABLE `email_info`
ADD PRIMARY KEY (`email_id`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 35

--
ALTER TABLE `orders`
ADD PRIMARY KEY (`order_id`);

--
-- Indexes for table `orders_info`
--
ALTER TABLE `orders_info`
ADD PRIMARY KEY (`order_id`),
ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `order_products`
--
ALTER TABLE `order_products`
ADD PRIMARY KEY (`order_pro_id`),
ADD KEY `order_products` (`order_id`),
ADD KEY `product_id` (`product_id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`product_id`);

--
-- Indexes for table `user_info`
--
ALTER TABLE `user_info`
ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `user_info_backup`
--
ALTER TABLE `user_info_backup`
ADD PRIMARY KEY (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin_info`
--
ALTER TABLE `admin_info`
MODIFY `admin_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `brands`
--
ALTER TABLE `brands`
MODIFY `brand_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `cart`
--

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 36

ALTER TABLE `cart`


MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=147;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `cat_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `email_info`
--
ALTER TABLE `email_info`
MODIFY `email_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `logs`
--
ALTER TABLE `logs`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `orders_info`
--
ALTER TABLE `orders_info`
MODIFY `order_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `order_products`
--
ALTER TABLE `order_products`
MODIFY `order_pro_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=91;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `product_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82;

--
-- AUTO_INCREMENT for table `user_info`
--
ALTER TABLE `user_info`
MODIFY `user_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `user_info_backup`
--
ALTER TABLE `user_info_backup`
MODIFY `user_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 37

--
-- Constraints for dumped tables
--

--
-- Constraints for table `orders_info`
--
ALTER TABLE `orders_info`
ADD CONSTRAINT `user_id` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`user_id`);

--
-- Constraints for table `order_products`
--
ALTER TABLE `order_products`
ADD CONSTRAINT `order_products` FOREIGN KEY (`order_id`) REFERENCES `orders_info` (`order_id`) ON
DELETE NO ACTION ON UPDATE CASCADE,
ADD CONSTRAINT `product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 38

Chapter 7

TESTING

7.1 Black-box (Functional) Testing

Testing against specification of system or component. Study it by examining its inputs and related
outputs. Key is to devise inputs that have a higher likelihood of causing outputs that reveal the
presence of defects. Use experience and knowledge of domain to identify such test cases. Failing
this a systematic approach may be necessary. Equivalence partitioning is where the input to a
program falls into a number of classes. E.g. positive numbers vs. negative numbers. Programs
normally behave the same way for each member of a class. Partitions exist for both input and
output. Partitions may be discrete or overlap. Invalid data (i.e. outside the normal partitions) is one
or more partitions that should be tested. Test cases are chosen to exercise each portion. Also test
boundary cases (atypical, extreme, zero) since these frequently show up defects. For completeness,
test all combinations of partitions. Black box testing is rarely exhaustive (because one doesn't test
every value in an equivalence partition) and sometimes fails to reveal corruption defects caused by
"weird" combination of inputs. Black box testing should not be used to try and reveal corruption
defects caused, for example, by assigning a pointer to point to an object of the wrong type. Static
inspection (or using a better programming language!) is preferable for this.

7.2 White-box (structural) Testing

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 39

Testing based on knowledge of structure of component (e.g. by looking at source code).


Advantage is that structure of code can be used to find out how many test case need to be
performed. Knowledge of the algorithm (examination of the code) can be used to identify the
equivalence partitions. Path testing is where the tester aims to exercise every independent
execution path through the component. All conditional statements tested for both true and false
cases. If a unit has n control statements, there will be up to 2n possible paths through it. This
demonstrates that it is much easier to test small program units than large ones. Flow graphs are a
pictorial representation of the paths of control through a program (ignoring assignments, procedure
calls and I/O statements). Use flow graph to design test cases that execute each path. Static tools
may be used to make this easier in programs that have a complex branching structure. Tools
support. Dynamic program analyzers instrument a program with additional code.

Typically this will count how many times each statement is executed. At end, print out report
showing which statements have and have not been executed. Problems with flow graph derived
testing:

1. Data complexity not taken into account.

2. Does not test all paths in combination.

3. Really only possible at unit and module testing stages because beyond that complexity is too
high.

Interface testing

Usually done at integration stage when modules or sub-systems are combined. Objective is to
detect errors or invalid assumptions about interfaces between modules. Reason these are not
shown up in unit testing is that test case may perpetuate same incorrect assumption made by
module designer. Particularly important when OO development has been used. Four types of
interface:

1. Parameter: data (or occasionally function references) passed from one unit to another.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 40

2. Shared memory: block of memory shared between units (e.g. global variable) .One places data
there and the other retrieves it.

3. Procedural: object-oriented or abstract data type form of interface, encapsulating several


procedures.

4. Message passing: one sub-system requests a service by passing a message. Client-server interface
also used by some OO architectures.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 41

Three common kinds of interface error:

1. Interface misuse: caller gives wrong number/types/order of parameters or sends invalid


message.

2. Interface misunderstanding: caller misunderstanding specification of called component and


provides or receives data in legal but unexpected form.

3. Timing errors: producer/consumer of data operate at different speeds and data is accessed
before being ready. "Race conditions".

Common manifestations are when each unit assumes the other one is checking for invalid data
(failure to check return status) and the consequences of when such a fault is propagated to other
units.

7.3 TESTING PROCESS

Best testing process is to test each subsystem separately, as we have done in my project. Best done
during implementation. Best done after small sub-steps of the implementation rather than large
chunks. Once each lowest level unit has been tested, units are combined with related units and
retested in combination. This proceeds hierarchically bottom-up until the entire system is tested as
a whole. Typical levels of testing:

1. Unit -procedure, function, method

2. Module -package, abstract data type, class

3. Sub-system - collection of related modules, cluster of classes, method-message paths

4. Acceptance testing - whole system with real data (involve customer, user, etc)

Alpha testing is acceptance testing with a single client (common for bespoke systems).

Beta testing involves distributing system to potential customers to use and provide feedback. In,
this project, Beta testing has been followed. This exposes system to situations and errors that
might not be anticipated by us.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 42

Future Aspects of Projects

1. The eSHOP at present not provide service through telephony, but in eSHOP we can provide it
in future.
2. Automatic mail sending facility is provided to the customer ,that purchases the product
3. Live help will be provided in the future
4. Websites will be mounted using secure http connection.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 43

Chapter 8
SNAPSHOT
Index page

User Login

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 44

Cart

Payment page

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 45

Track page

Admin login page

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 46

Orders page

Add product page

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 47

Users list page

User log page

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 48

Chapter 9
CONCLUSION

The package was designed in such a way that future modifications can be done easily. The
conclusions can be deduced from the development of the project.

 Automation of the entire system improves the efficiency


 It provides a friendly graphical user interface which proves to be better when compared to the
existing system.

 It gives appropriate access to the authorized users depending on their permissions.


 It effectively overcomes the delay in communications.
 Updating of information becomes so easier.
 System security, data security and reliability are the striking features.
The System has adequate scope for modification in future if it is necessary.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 49

Chapter 10
FUTURE ENHANCEMENT

With the existing constraints, the developed systems is not what was planned initially. The
primary aim of this project has been met. All the objectives that were set out have been completed
and giving positive results in the ends. In the future some features that can be added will be about
the two factor authentication. Although the user requirements were successfully met the
application is not yet fully utilized because the users of this website are just learning about the
benefits and working of the website. The user testing and evaluation of the application did
however highlight rooms for the expansion. The application could therefore be developed further
as soon as the user is fully aware of its working.

Department of Computer Application, AIGS 2020-2021


Online Shopping P a g e | 50

Chapter 11
BIBLIOGRAPHY

BOOKS

1. HTML 4.0 by E.Stephen Mack and Janan Platt.

2. HTML, the complete reference edition by TATA MC GRAWHILL.

3. Head First JSP and Servlets.

4. Watchgallery.com (from Google)

WEBSITES:

1. www.javascript.com

2. www.phpgurukhul.com

3. http://www.tizag.com/mysqlTutorial/

4. http://www.tizag.com/cssT/

Department of Computer Application, AIGS 2020-2021

You might also like