E-Commerce Website Project Report
E-Commerce Website Project Report
AT.
SSLD VARSHNEY ENGINEERING COLLEGE
Affiliated to:
DR. APJ ABDUL KALAM TECHNICAL UNIVERSITY
TABLE OF CONTENTS
16.TESTING…………………………………………………………………………………………….104
17.UNIT TESTING…………………………………………………………………………………….105
18.SYSTEM TESTING………………………………………………………………………………..106
19.OBJECTIVE OF TESTING……………………………………………………………………….107
22.BIBLIOGRAPHY…………………………………………………………………………………….110
They have a very broad idea about what they want to buy. Many
customers nowadays search for their products on Google rather
than visiting specific e-commerce sites. They believe that Google
will take them to the e-commerce sites that have their product.
ACKNOWLEDGEMENT
The satisfaction that accompanies to this project would be incomplete without the
mention of the people who made it possible, without whose constant guidance and
encouragement would have made my efforts go in vain.
I also express my gratitude and sincere thanks to all the teaching and non-
teaching staff of Computer Science & Engineering Department.
Ravendra Singh
(B.Tech – IV Year, VIII Sem)
CERTIFICATE
ABSTRACT
The aim of this paper is to build and develop a reliable website based on
the e-commerce theories, developing effective well designed web pages.
This website will sell Organic Fruits.
Software Specification:-
i. Python
ii. Django Framework
iii. SQLITE Database
Platform:-
i. Visual Studio
Hardware Specification:-
i. Dual core
ii. Ram-2GB
iii. HDD-256GB
iv. Monitor
v. Printer
We'll outline the main features, including some of the advanced functionality that we
won't have time to cover in detail in this module. We'll also show you some of the main
building blocks of a Django application (although at this point you won't yet have a
development environment in which to test it).
Django follows the "Batteries included" philosophy and provides almost everything
developers might want to do "out of the box". Because everything you need is part of
the one "product", it all works seamlessly together, follows consistent design principles.
Django can be (and has been) used to build almost any type of website — from
content management systems and wikis, through to social networks and news sites. It
can work with any client-side framework, and can deliver content in almost any format
(including HTML, RSS feeds, JSON, and XML).
Internally, while it provides choices for almost any functionality you might want (e.g.
several popular databases, templating engines, etc.), it can also be extended to use
other components if needed.
where it is vulnerable (instead cookies just contain a key, and the actual data is stored.
Django code is written using design principles and patterns that encourage the creation
of maintainable and reusable code. In particular, it makes use of the Don't Repeat
Yourself (DRY) principle so there is no unnecessary duplication, reducing the amount
of code. Django also promotes the grouping of related functionality into reusable
"applications" and, at a lower level, groups related code into modules.
Django is written in Python, which runs on many platforms. That means that you are
not tied to any particular server platform, and can run your applications on many
flavors of Linux, Windows, and macOS. Furthermore, Django is well-supported by
many web hosting providers, who often provide specific infrastructure and
documentation for hosting Django sites.
10
Visual Studio:-
Visual Studio Code has some very unique features. They are listed as below :
earlier, programmers needed Web-Support: a different editor for different languages, but it has
built-in multi-language support. This also means it easily detects if there’s any fault or cross-
Intelli-Sense: It can detect if any snippet of code is left incomplete. Also, common variable
syntaxes and variable declarations are made automatically. Ex: If a certain variable is being
used in the program and the user has forgotten to declare, intelli-sense will declare it for the
user.
Cross-Platform Support: Traditionally, editors used to support either Windows or Linux or Mac
Systems. But Visual Studio Code is cross-platform. So it can work on all three platforms. Also,
the code works on all three platforms; else, the open-source and proprietary software codes
used to be different.
11
SQLite Database:-
SQLite is a software library that provides a relational database management system. The lite in
SQLite means lightweight in terms of setup, database administration, and required resources.
Normally, an RDBMS such as MySQL, PostgreSQL, etc., requires a separate server process to
operate. The applications that want to access the database server use TCP/IP protocol to send and
receive requests. This is called client/server architecture.
SQLite database is integrated with the application that accesses the database. The applications
interact with the SQLite database read and write directly from the database files stored on disk.
SQLite is self-contained means it requires minimal support from the operating system or external
library. This makes SQLite usable in any environment especially in embedded devices like iPhones,
Android phones, game consoles, handheld media players, etc.
SQLite is developed using ANSI-C. The source code is available as a big sqlite3.c and its header file
sqlite3.h. If you want to develop an application that uses SQLite, you just need to drop these files into
your project and compile it with your code.
Zero configuration because of the serverless architecture, you don’t need to “install” SQLite before
12
using it. There is no server process that needs to be configured, started, and stopped. In addition,
SQLite does not use any configuration files.
All transactions in SQLite are fully ACID-compliant. It means all queries and changes are Atomic,
Consistent, Isolated, and Durable.
In other words, all changes within a transaction take place completely or not at all even when an
unexpected situation like application crash, power failure, or operating system crash occurs.
SQLite uses dynamic types for tables. It means you can store any value in any column, regardless of
the data type.
SQLite allows a single database connection to access multiple database files simultaneously. This
brings many nice features like joining tables in different databases or copying data between
databases in a single command.
SQLite is capable of creating in-memory databases that are very fast to work with.
13
RDBMS:-
The RDBMS is the most popular database system among organizations across the world.
It provides a dependable method of storing and retrieving large amounts of data while
offering a combination of system performance and ease of implementation.
14
PROBLEM DEFINITION
Problem Analysis:-
E-commerce provides an easy way to sell products to a large customer base. However, there is a lot
of competition among multiple e-commerce sites. When users land on an e-commerce site, they
expect to find what they are looking for quickly and easily. Also, users are not sure about the brands
or the actual products they want to purchase. They have a very broad idea about what they want to
buy. Many customers nowadays search for their products on Google rather than visiting specific e-
commerce sites. They believe that Google will take them to the e-commerce sites that have their
product.
The purpose of any e-commerce website is to help customers narrow down their broad ideas and
enable them to finalize the products they want to purchase. For example, suppose a customer is
interested in purchasing a mobile. His or her search for a mobile should list mobile brands, operating
systems on mobiles, screen size of mobiles, and all other features as facets. As the customer selects
more and more features or options from the facets provided, the search narrows down to a small list
of mobiles that suit his or her choice. If the list is small enough and the customer likes one of the
mobiles listed, he or she will make the purchase.
15
REQUIREMENT SPECIFICATION
1. Functional Requirements:-
These requirements are the what of your website i.e. it includes the functions and core operations of
your e-commerce store which lets the users interact with your website. The FRs can be implemented
as a single website feature and form the basis of the whole software development process.
2. Non-functional Requirements:
These requirements are the how of your website i.e. they form the user experience of your e-
commerce store and imply a different level of expectations. They can be the sum of the functional
requirements and are implemented as a sum of web features. The common example is that users can
easily find the products on the website and they should be captivating for the user.
i. Performance
ii. Scalability
iii. Portability
iv. Compatibility
v. Reliability
vi. Availability
vii. Maintainability
viii. Security
ix. Localization
16
SCOPE OF SOLUTION
Features:-
17
DFD DIAGRAMS
Login DFD: -
18
Registration DFD :-
19
Level 1 DFD:-
20
DATABASE TABLE
Maincategory Table:-
Field Name Field Type Default Null PK Extra
id int yes auto_increment
name CharField(20) no
Subcategory Table:-
Field Name Field Type Default Null PK Extra
id int yes auto_increment
name CharField(20) no
Brand Table:-
Field Name Field Type Default Null PK Extra
id int yes auto_increment
name CharField(20) no
pic ImageField() True yes
21
Product Table:-
Field Name Field Type Default Null PK Extra FK
id int yes auto_increment
name CharField(20) no
maincategory CharField() no yes
subcategory CharField() no yes
brand CharField() no yes
color CharField(20) no
size CharField(10) no
baseprise IntegerField(20) no
discount IntegerField(20) no
finalprice IntegerField(20) no
stock BooleanField() True no
description TextField() no
pic1 ImageField() no
pic2 ImageField() True no
pic3 ImageField() True no
pic4 ImageField() True no
22
User Table:-
Field Name Field Type Default Null PK Extra
id int yes auto_increment
name CharField(20) no
username CharField(30) no
email EmailField(30) no
phone IntegerField(30) no
addressline1 CharField(100) no
addressline2 CharField(100) True yes
addressline3 IntegerField(100) True yes
pin IntegerField(20) True yes
city CharField(20) True yes
state CharField() True yes
pic ImageField() True yes
23
WORKING
24
WEBSITE DESCRIPTION
An e-commerce website is one that allows people to buy and sell physical goods,
services, and wearing products over the internet rather than at a brick-and-mortar
location. Through an e-commerce website, a business can process orders, accept
payments, manage shipping and logistics, and provide customer service.
25
DESIGN CODE
Profile.html
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
{% block title %}
<title>ECart - Home</title>
{% endblock %}
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="Free HTML Templates" name="keywords">
<meta content="Free HTML Templates" name="description">
<body>
<!-- Topbar Start -->
<div class="container-fluid">
<div class="row align-items-center bg-light py-3 px-xl-5 d-none d-lg-flex">
<div class="col-lg-4">
<a href="/" class="text-decoration-none">
<span class="h1 text-uppercase text-primary bg-dark px-2">E</span>
<span class="h1 text-uppercase text-dark bg-primary px-2 ml-
n1">Cart</span>
26
</a>
</div>
<div class="col-lg-4 col-6 text-left">
<form action="/search/" method="post">
{% csrf_token %}
<div class="input-group">
<input type="text" name="search" class="form-control"
placeholder="Search for products">
<div class="input-group-append">
<span class="input-group-text bg-transparent text-primary">
<i class="fa fa-search"></i>
</span>
</div>
</div>
</form>
</div>
<div class="col-lg-4 col-6 text-right">
<p class="m-0">Customer Service</p>
<h5 class="m-0">+91-803326227</h5>
</div>
</div>
</div>
<!-- Topbar End -->
27
</div>
</div>
<div class="navbar-nav w-100">
<div class="nav-item dropdown dropright">
<a href="#" class="nav-link dropdown-toggle" data-
toggle="dropdown">Subcategory <i class="fa fa-angle-right float-right mt-1"></i></a>
<div class="dropdown-menu position-absolute rounded-0 border-0 m-
0">
{% for item in request.session.subcategory %}
<a href="/shop/All/{{item}}/All" class="dropdown-
item">{{item}}</a>
{% endfor %}
</div>
</div>
</div>
<div class="navbar-nav w-100">
<div class="nav-item dropdown dropright">
<a href="#" class="nav-link dropdown-toggle" data-
toggle="dropdown">Brand <i class="fa fa-angle-right float-right mt-1"></i></a>
<div class="dropdown-menu position-absolute rounded-0 border-0 m-
0">
{% for item in request.session.brand %}
<a href="/shop/All/All/{{item}}" class="dropdown-
item">{{item}}</a>
{% endfor %}
</div>
</div>
</div>
</nav>
</div>
<div class="col-lg-9">
<nav class="navbar navbar-expand-lg bg-dark navbar-dark py-3 py-lg-0 px-0">
<a href="" class="text-decoration-none d-block d-lg-none">
<span class="h1 text-uppercase text-dark bg-light px-2">Multi</span>
<span class="h1 text-uppercase text-light bg-primary px-2 ml-
n1">Shop</span>
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-
target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-between"
id="navbarCollapse">
<div class="navbar-nav mr-auto py-0">
<a href="/" class="nav-item nav-link active">Home</a>
<a href="/shop/All/All/All/" class="nav-item nav-link">Shop</a>
<a href="/contact/" class="nav-item nav-link">Contact</a>
{% if request.user.is_authenticated %}
28
{% block body %}
<!-- Carousel Start -->
<div class="container-fluid mb-3">
<div class="row px-xl-5">
<div class="col-lg-8">
<div id="header-carousel" class="carousel slide carousel-fade mb-30 mb-lg-0"
data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#header-carousel" data-slide-to="0"
class="active"></li>
<li data-target="#header-carousel" data-slide-to="1"></li>
<li data-target="#header-carousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item position-relative active" style="height:
430px;">
<img class="position-absolute w-100 h-100"
src="/static/img/carousel-1.jpg" style="object-fit: cover;">
<div class="carousel-caption d-flex flex-column align-items-
center justify-content-center">
29
30
31
32
</html>
33
Shop.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Shop</title>
{% endblock %}
{% block body %}
<!-- Breadcrumb Start -->
<div class="container-fluid">
<div class="row px-xl-5">
<div class="col-12">
<nav class="breadcrumb bg-light mb-30">
<a class="breadcrumb-item text-dark" href="/">Home</a>
<span class="breadcrumb-item active">Shop List</span>
</nav>
</div>
</div>
</div>
<!-- Breadcrumb End -->
</div>
<!-- Shop Sidebar End -->
35
36
<a class="dropdown-item"
href="/filter/{{mc}}/{{sc}}/{{br}}/Latest/">Latest</a>
<a class="dropdown-item"
href="/filter/{{mc}}/{{sc}}/{{br}}/LTOH/">Price : Low to High</a>
<a class="dropdown-item"
href="/filter/{{mc}}/{{sc}}/{{br}}/HTOL/">Price : High to Low</a>
</div>
</div>
</div>
</div>
<!-- Shop Product End -->
</div>
</div>
<!-- Shop End -->
{% endblock %}
37
Cart.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Cart</title>
{% endblock %}
{% block body %}
<!-- Breadcrumb Start -->
<div class="container-fluid">
<div class="row px-xl-5">
<div class="col-12">
<nav class="breadcrumb bg-light mb-30">
<a class="breadcrumb-item text-dark" href="/">Home</a>
<a class="breadcrumb-item text-dark" href="/shop/All/All/All">Shop</a>
<span class="breadcrumb-item active">Shopping Cart</span>
</nav>
</div>
</div>
</div>
<!-- Breadcrumb End -->
<td class="align-
middle">{{value.brand}}/{{value.color}}/{{value.size}}</td>
<td class="align-middle">₹{{value.price}}</td>
<td class="align-middle">
<div class="input-group quantity mx-auto" style="width:
100px;">
<div class="input-group-btn w-25">
<a href="/update-cart/{{key}}/Dec/" class="btn btn-sm
btn-primary btn-minus" >
<i class="fa fa-minus"></i>
</a>
</div>
<p class="w-50">{{value.qty}}</p>
<div class="input-group-btn w-25">
<a href="/update-cart/{{key}}/Inc/" class="btn btn-sm
btn-primary btn-plus">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
</td>
<td class="align-middle">₹{{value.total}}</td>
<td class="align-middle"><a class="btn btn-sm btn-danger"
href="/remove-from-cart/{{key}}"><i class="fa fa-times"></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="text-center">
<p>No Items in Cart</p>
<a href="/shop/All/All/All" class="btn btn-primary">Shop Now</a>
</div>
{% endif %}
</div>
<!-- Cart End -->
{% endblock %}
39
Contact.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Contact</title>
{% endblock %}
{% block body %}
40
</div>
<div class="control-group mb-2">
<input type="text" class="form-control" name="phone"
placeholder="Your Phone Number" required />
</div>
<div class="control-group mb-2">
<input type="text" class="form-control" name="subject"
placeholder="Subject" required />
</div>
<div class="control-group mb-2">
<textarea class="form-control" rows="8" name="message"
placeholder="Message" required></textarea>
</div>
<div>
<button class="btn btn-primary py-2 px-4 w-100" type="submit"
id="sendMessageButton">Send
Message</button>
</div>
</form>
</div>
</div>
<div class="col-lg-5 mb-5">
<div class="bg-light p-30 mb-30">
<div class="mapouter">
src="https://maps.google.com/maps?q=a-
43%20Sector%2016%20Noida&t=&z=13&ie=UTF8&iwloc=&output=embed"
frameborder="0" scrolling="no" marginheight="0"
marginwidth="0"></iframe></div>
</div>
</div>
<div class="bg-light p-30 mb-3">
<p class="mb-2"><i class="fa fa-map-marker-alt text-primary mr-
3"></i>Kaimganj , UP, India
</p>
<p class="mb-2"><a class="text-dark"
href="mailto:[email protected]"><i
class="fa fa-envelope text-primary mr-
3"></i>[email protected]</a></p>
<p class="mb-2"><a class="text-dark" href="tel:9873848046"><i
class="fa fa-phone-alt text-primary mr-3"></i>+91
8303326227</a></p>
</div>
</div>
</div>
</div>
<!-- Contact End -->
41
Checkout.html:-
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Checkout</title>
{% endblock %}
{% block body %}
42
<td>{{buyer.phone}}</td>
</tr>
<tr>
<th>Address Line 1</th>
<td>{{buyer.addressline1}}</td>
</tr>
<tr>
<th>Address Line 2</th>
<td>{{buyer.addressline2}}</td>
</tr>
<tr>
<th>Address Line 3</th>
<td>{{buyer.addressline3}}</td>
</tr>
<tr>
<th>Pin</th>
<td>{{buyer.pin}}</td>
</tr>
<tr>
<th>City</th>
<td>{{buyer.city}}</td>
</tr>
<tr>
<th>State</th>
<td>{{buyer.state}}</td>
</tr>
<tr>
<td colspan="2"><a href="/update-profile/" class="btn btn-primary
w-100">Update Profile</a></td>
</tr>
</table>
</div>
</div>
<div class="col-md-6">
<h5 class="section-title position-relative text-uppercase mb-3 text-
center"><span class="bg-secondary pr-3">Order Total</span></h5>
<div class="bg-light p-30 mb-5">
<div class="border-bottom">
<h6 class="mb-3">Products</h6>
{% for key,value in request.session.cart.items %}
<div class="d-flex justify-content-between">
<p>{{value.name}}(₹{{value.price}}X{{value.qty}})</p>
<p>₹{{value.total}}</p>
</div>
{% endfor %}
<div class="mb-5">
<h5 class="section-title position-relative text-uppercase mb-3 text-
center"><span class="bg-secondary pr-3">Payment</span></h5>
43
{% endblock %}
44
Confirmation.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Confirmation</title>
{% endblock %}
{% block body %}
<div class="container-fluid my-3 text-center">
<h3 class="text-success">Thank You!</h3>
<h4>Now You Can Track Your Orders in Profile Section!!!</h4>
<a href="/shop/All/All/All" class="btn btn-primary">Shop More</a>
</div>
{% endblock %}
45
Details.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Single Product</title>
{% endblock %}
{% block body %}
{% if data.pic4 %}
<img class="w-100" src="{{data.pic4.url}}" height="500px"
alt="Image">
{% endif %}
</div>
</div>
<a class="carousel-control-prev" href="#product-carousel" data-
slide="prev">
<i class="fa fa-2x fa-angle-left text-dark"></i>
</a>
<a class="carousel-control-next" href="#product-carousel" data-
slide="next">
<i class="fa fa-2x fa-angle-right text-dark"></i>
</a>
</div>
</div>
47
</div>
</div>
</div>
</div>
<!-- Products End -->
{% endblock %}
48
Forget.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Forget Password</title>
{% endblock %}
{% block body %}
{% endblock %}
49
Forget2.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Forget Password</title>
{% endblock %}
{% block body %}
{% endblock %}
50
Pay.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>Ecart | Payment</title>
{% endblock %}
{% block body %}
<div class="container p-3 mt-3 mb-3">
<div class="row">
<button id="rzp-button1" class="btn btn-primary text-dark w-100" style="border:
none;">Pay</button>
</div>
</div>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
var options = {
"key": "{{api_key}}", // Enter the Key ID generated from the Dashboard
"name": "Ecart",
"description": "Test Transaction",
"order_id": "{{order_id}}", //This is a sample Order ID. Pass the `id` obtained in the
response of Step 1
"handler": function (response) {
// alert(response.razorpay_payment_id);
// alert(response.razorpay_order_id);
// alert(response.razorpay_signature)
window.open("/paymentSuccess/"+response.razorpay_payment_id+"/"+response.razorpay_order
_id+"/"+response.razorpay_signature+"/")
},
"prefill": {
"name": "{{User.name}}",
"email": "{{User.email}}",
"contact": "{{User.phone}}"
},
"notes": {
"address": "Razorpay Corporate Office"
},
"theme": {
"color": "#3399cc"
}
};
document.getElementById('rzp-button1').onclick = function (e) {
rzp1.open();
e.preventDefault();
}
</script>
{% endblock %
51
Profile.html
{% extends 'index.html' %}
{% load static %}
{% load myCustomFilters %}
{% block title %}
<title>ECart - Buyer Profile</title>
{% endblock %}
{% block body %}
<tr>
<th>Address Line 3</th>
<td>{{data.addressline3}}</td>
</tr>
<tr>
<th>Pin</th>
<td>{{data.pin}}</td>
</tr>
<tr>
<th>City</th>
<td>{{data.city}}</td>
</tr>
<tr>
<th>State</th>
<td>{{data.state}}</td>
</tr>
<tr>
<td colspan="2"><a href="/update-profile/" class="btn btn-primary w-
100">Update Profile</a></td>
</tr>
</table>
</div>
</div>
</div>
<h5 class="text-center bg-primary p-2">Wishlist</h5>
{% if wishlist %}
<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th></th>
<th>Name</th>
<th>Brand</th>
<th>Color</th>
<th>Size</th>
<th>Price</th>
<th></th>
<th></th>
</tr>
{% for item in wishlist %}
<tr>
<td><img src="{{item.product.pic1.url}}" width="70px" height="70px"
class="rounded" alt=""></td>
<td>{{item.product.name}}</td>
<td>{{item.product.brand}}</td>
<td>{{item.product.size}}</td
<td>₹{{item.product.finalprice}}</td>
<td><a href="/single-product/{{item.product.id}}"><i class="fa fa-shopping-
cart text-success"></i></a>
53
</td>
<td><a href="/remove-from-wishlist/{{item.id}}"><i class="fa fa-trash text-
danger"></i></a></td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class="text-center">
<p>No Items in Wishlist</p>
<a href="/shop/All/All/All/" class="btn btn-primary">Shop</a>
</div>
{% endif %}
54
<th>Shipping</th>
<td>₹{{item.shipping}}</td>
</tr>
<tr>
<th>Final</th>
<td>₹{{item.final}}</td>
</tr>
<tr>
<th>Date</th>
<td>{{item.date}}</td>
</tr>
</table>
</div>
</div>
<div class="col-md-7">
<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th></th>
<th>Name</th>
<th>Brand/Color/Size</th>
<th>Price</th>
<th>Qty</th>
<th>Total</th>
</tr>
{% for cp in item.checkoutProducts %}
<tr>
<td><img src="{{cp.i.pic1.url}}" width="70px" height="70px"
class="rounded" alt=""></td>
<td>{{cp.product.name}}</td>
<td>{{cp.product.brand}}/{{cp.i.color}}/{{cp.i.size}}</td>
<td>₹{{cp.i.finalprice}}</td>
<td>{{cp.qty}}</td>
<td>₹{{cp.total}}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="text-center">
<p>No Order History Found!!!</p>
55
{% endblock %}
56
Signup.html
{% extends 'index.html' %}
{% load static %}
{% block title %}
<title>ECart - Signup</title>
{% endblock %}
{% block body %}
{% endblock %}
58
View.py
def homePage(Request):
# Request.session.flush()
products = Product.objects.all("-id")
brands = Brand.objects.all()
maincategory = Maincategory.objects.all()
subcategory = Subcategory.objects.all()
data = []
for item in brands:
data.append(item.name)
Request.session['brand']=data
data = []
for item in maincategory:
data.append(item.name)
Request.session['maincategory']=data
data = []
for item in subcategory:
data.append(item.name)
Request.session['subcategory']=data
return render(Request,"index.html",{'products':products,'brands':brands})
def shopPage(Request,mc,sc,br):
if(mc=="All" and sc=="All" and br=="All"):
data = Product.objects.all().order_by("-id")
elif(mc!="All" and sc=="All" and br=="All"):
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc)).order_by("-id")
59
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),subcategory=Subcategory
.objects.get(name=sc)).order_by("-id")
elif(mc!="All" and sc=="All" and br!="All"):
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),brand=Brand.objects.get
(name=br)).order_by("-id")
subcategories = Subcategory.objects.all()
return
render(Request,"shop.html",{'data':data,'maincategories':maincategories,'subcategories':subca
tegories,'brands':brands,'mc':mc,'sc':sc,'br':br})
def filterPage(Request,mc,sc,br,filter):
if(filter=="Latest"):
if(mc=="All" and sc=="All" and br=="All"):
data = Product.objects.all().order_by("-id")
data =
Product.objects.filter(subcategory=Subcategory.objects.get(name=sc)).order_by("-id")
elif(mc=="All" and sc=="All" and br!="All"):
data = Product.objects.filter(brand=Brand.objects.get(name=br)).order_by("-
id")
elif(mc!="All" and sc!="All" and br=="All"):
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),subcategory=Subcategory
.objects.get(name=sc)).order_by("-id")
elif(mc!="All" and sc=="All" and br!="All"):
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),brand=Brand.objects.get
(name=br)).order_by("-id")
elif(mc=="All" and sc!="All" and br!="All"):
data =
Product.objects.filter(brand=Brand.objects.get(name=br),subcategory=Subcategory.objects.get(n
ame=sc)).order_by("-id")
else:
60
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),brand=Brand.objects.get
(name=br),subcategory=Subcategory.objects.get(name=sc)).order_by("-id")
elif(filter=="LTOH"):
if(mc=="All" and sc=="All" and br=="All"):
data = Product.objects.all().order_by("finalprice")
elif(mc!="All" and sc=="All" and br=="All"):
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc)).order_by("finalprice")
elif(mc=="All" and sc!="All" and br=="All"):
data =
Product.objects.filter(subcategory=Subcategory.objects.get(name=sc)).order_by("finalprice")
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc)).order_by("-
finalprice")
data = Product.objects.filter(brand=Brand.objects.get(name=br)).order_by("-
finalprice")
elif(mc!="All" and sc!="All" and br=="All"):
61
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),subcategory=Subcategory
.objects.get(name=sc)).order_by("-finalprice")
data =
Product.objects.filter(brand=Brand.objects.get(name=br),subcategory=Subcategory.objects.get(n
ame=sc)).order_by("-finalprice")
else:
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),brand=Brand.objects.get
(name=br),subcategory=Subcategory.objects.get(name=sc)).order_by("-finalprice")
maincategories = Maincategory.objects.all()
brands = Brand.objects.all()
return
render(Request,"shop.html",{'data':data,'maincategories':maincategories,'subcategories':subca
tegories,'brands':brands,'mc':mc,'sc':sc,'br':br})
def priceFilterPage(Request,mc,sc,br):
option = Request.POST.get("price")
if(option=="1"):
min = 0
max =1000000
elif(option=="2"):
min = 0
max = 1000
elif(option=="3"):
min = 1000
max = 2000
elif(option=="4"):
min = 2000
max = 3000
elif(option=="5"):
min = 3000
max = 4000
elif(option=="6"):
min = 4000
max = 5000
elif(option=="7"):
62
min = 5000
max = 1000000
if(mc=="All" and sc=="All" and br=="All"):
data = Product.objects.filter(finalprice__gte=min,finalprice__lte=max).order_by("-
id")
elif(mc!="All" and sc=="All" and br=="All"):
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),finalprice__gte=min,fin
alprice__lte=max).order_by("-id")
elif(mc=="All" and sc!="All" and br=="All"):
data =
Product.objects.filter(subcategory=Subcategory.objects.get(name=sc),finalprice__gte=min,final
price__lte=max).order_by("-id")
elif(mc=="All" and sc=="All" and br!="All"):
data =
Product.objects.filter(brand=Brand.objects.get(name=br),finalprice__gte=min,finalprice__lte=m
ax).order_by("-id")
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),brand=Brand.objects.get
(name=br),finalprice__gte=min,finalprice__lte=max).order_by("-id")
subcategories = Subcategory.objects.all()
brands = Brand.objects.all()
return
render(Request,"shop.html",{'data':data,'maincategories':maincategories,'subcategories':subca
tegories,'brands':brands,'mc':mc,'sc':sc,'br':br})
def searchPage(Request):
if(Request.method=="POST"):
search = Request.POST.get("search")
63
data =
Product.objects.filter(Q(name__contains=search)|Q(color__contains=search)|Q(size__contains=se
arch)|Q(stock__contains=search)|Q(description__contains=search))]
subcategories = Subcategory.objects.all()
brands = Brand.objects.all()
return
render(Request,"shop.html",{'data':data,'maincategories':maincategories,'subcategories':subca
tegories,'brands':brands,'mc':'All','sc':"All",'br':'All'})
else:
return HttpResponseRedirect("/")
def singleProductPage(Request,id):
data = Product.objects.get(id=id)
relatedProducts =
Product.objects.filter(maincategory=Maincategory.objects.get(name=data.maincategory))
return render(Request,"detail.html",{'data':data,'relatedProducts':relatedProducts})
def addToCartPage(Request,num):
p = Product.objects.get(id=num)
if(p):
cart = Request.session.get("cart",None)
if(cart):
else:
cart =
{str(num):{'id':p.id,'name':p.name,'brand':p.brand.name,'color':p.color,'size':p.size,'price'
:p.finalprice,'qty':1,'total':p.finalprice,'pic':p.pic1.url}}
subtotal = 0
count = 0
for key,values in cart.items():
subtotal = subtotal+values['total']
count = count + values['qty']
if(subtotal>0 and subtotal<1000):
shipping = 150
else:
shipping = 0
total = subtotal + shipping
Request.session['cart']=cart
Request.session['shipping']=shipping
Request.session['total']=total
Request.session['count']=count
Request.session.set_expiry(60*60*24*30)
return HttpResponseRedirect("/cart/")
else:
return HttpResponseRedirect("/shop/All/All/All")
64
def cartPage(Request):
cart = Request.session.get("cart",None)
return render(Request,"cart.html",{'cart':cart})
def removeFromCartPage(Request,num):
cart = Request.session.get("cart",None)
if(cart and num in cart):
del cart[num]
Request.session['cart']=cart
subtotal = 0
count = 0
for key,values in cart.items():
subtotal = subtotal+values['total']
count = count + values['qty']
if(subtotal>0 and subtotal<1000):
shipping = 150
else:
shipping = 0
total = subtotal + shipping
Request.session['cart']=cart
Request.session['shipping']=shiping
Request.session['total']=total
Request.session['count']=count
return HttpResponseRedirect("/cart/")
def updateCartPage(Request,num,op):
cart = Request.session.get("cart",None)
if(cart and num in cart):
item = cart[num]
if(item['qty']==1 and op=="Dec"):
return HttpResponseRedirect("/cart/")
else:
item['qty'] = item['qty']+1
item['total'] = item['total']+item['price']
Request.session['cart']=cart
subtotal = 0
count = 0
for key,values in cart.items():
65
shipping = 150
else:
shipping = 0
total = subtotal + shipping
Request.session['cart']=cart
Request.session['subtotal']=subtotal
Request.session['shipping']=shipping
Request.session['total']=total
Request.session['count']=count
Request.session.set_expiry(60*60*24*30)
return HttpResponseRedirect("/cart/")
@login_required(login_url="/login/")
def addToWishlist(Request,num):
try:
p = Product.objects.get(id=num)
buyer = Buyer.objects.get(username=Request.user.username)
try:
wishlist = Wishlist.objects.get(buyer=buyer,product=p)
except:
w = Wishlist()
w.buyer = buyer
w.product = p
w.save()
except:
pass
return HttpResponseRedirect("/profile/")
@login_required(login_url="/login/")
def removeFromWishlistPage(Request,num):
try:
item = Wishlist.objects.get(id=num)
except:
pass
return HttpResponseRedirect("/profile/")
@login_required(login_url="/login/")
def checkoutPage(Request):
try:
buyer = Buyer.objects.get(username=Request.user.username)
return render(Request,"checkout.html",{'buyer':buyer})
except:
return HttpResponseRedirect("/cart/")
client = razorpay.Client(auth=(RAZORPAY_API_KEY,RAZORPAY_API_SECRET_KEY))
@login_required(login_url="/login/")
def placeOrderPage(Request):
66
if(Request.method=="POST"):
buyer = Buyer.objects.get(username=Request.user.username)
mode = Request.POST.get("mode")
subtotal = Request.session.get("subtotal",0)
shipping = Request.session.get("shipping",0)
total = Request.session.get("total",0)
if(subtotal==0):
return HttpResponseRedirect("/checkout/")
check = Checkout()
check.buyer = buyer
check.subtotal = subtotal
check.shipping = shipping
check.final = total
check.save()
cart = Request.session.get("cart",None)
for key,values in cart.items():
p = Product.objects.get(id=(int(key)))
cp = CheckoutProducts()
cp.checkout = check
cp.product = p
cp.qty = values['qty']
cp.total = values['total']
cp.save()
Request.session['cart'] = {}
Request.session['subtotal'] = 0
Request.session['count'] = 0
if(mode=="COD"):
subject = 'Order Has Been Placed : Team E-Cart'
message = """
Hello """+buyer.name+"""
Your Order Has Been Placed!!!
Now Your Track Your Order in Profile Section
Team : E-Cart
"""
email_from = settings.EMAIL_HOST_USER
recipient_list = [buyer.email, ]
return HttpResponseRedirect("/confirmation")
else:
orderAmount = check.final*100
orderCurrency = "INR"
67
paymentOrder =
client.order.create(dict(amount=orderAmount,currency=orderCurrency,payment_capture=1))
paymentId = paymentOrder['id']
check.paymentMode=2
check.save()
return render(Request,"pay.html",{
"amount":orderAmount,
"api_key":RAZORPAY_API_KEY,
"User":buyer
})
else:
return HttpResponseRedirect("/checkout/")
@login_required(login_url='/login/')
def paymentSuccessPage(Request,rppid,rpoid,rpsid):
buyer = Buyer.objects.get(username=Request.user)
check = Checkout.objects.filter(user=buyer)
check.rppid=rppid
check.paymentStatus=2
check.save()
@login_required(login_url="/login/")
def payAgainPage(Request,checkid):
try:
check = Checkout.objects.get(id=checkid)
buyer = Buyer.objects.get(username=Request.user)
orderAmount = check.final*100
client.order.create(dict(amount=orderAmount,currency=orderCurrency,payment_capture=1))
paymentId = paymentOrder['id']
check.paymentMode=2
check.save()
68
return render(Request,"pay.html",{
"amount":orderAmount,
"api_key":RAZORPAY_API_KEY,
"order_id":paymentId,
"User":buyer
})
except:
return HttpResponseRedirect("/profile/")
@login_required(login_url="/login/")
def confirmationPage(Request):
return render(Request,"confirmation.html")
def contactPage(Request):
if(Request.method=="POST"):
c = Contact()
c.name = Request.POST.get("name")
c.email = Request.POST.get("email")
c.phone = Request.POST.get("phone")
c.subject = Request.POST.get("subject")
c.message = Request.POST.get("message")
c.save()
messages.success(Request,"Thanks to Share Your Query With Us!!! Our Team Will Contact
You Soon!!!")
return render(Request,"contact.html")
def loginPage(Request):
if(Request.method=="POST"):
username = Request.POST.get("username")
password = Request.POST.get("password")
user = auth.authenticate(username=username,password=password)
if(user is None):
messages.error(Request,"Invalid Username or Password!!!")
else:
auth.login(Request,user)
if(user.is_superuser):
return HttpResponseRedirect("/admin/")
def signupPage(Request):
if(Request.method=="POST"):
if(Request.POST.get("password")!=Request.POST.get("password")):
69
user.save()
b = Buyer()
b.name = Request.POST.get("name")
b.username = Request.POST.get("username")
b.email = Request.POST.get("email")
b.phone = Request.POST.get("phone")
b.save()
@login_required(login_url="/login/")
def profilePage(Request):
user = User.objects.get(username=Request.user.username)
if(user.is_superuser):
return HttpResponseRedirect("/admin/")
else:
buyer = Buyer.objects.get(username=Request.user.username)
wishlist = Wishlist.objects.filter(buyer=buyer)
checkout = Checkout.objects.filter(buyer=buyer)
orders = []
for item in checkout:
cp = CheckoutProducts.objects.filter(checkout=item.id)
orders.append({'checkout':item,'checkoutProducts':cp})
return HttpResponseRedirect("/admin/")
else:
buyer = Buyer.objects.get(username=Request.user.username)
if(Request.method=="POST"):
buyer.name = Request.POST.get("name")
buyer.email = Request.POST.get("email")
buyer.phone = Request.POST.get("phone")
buyer.addressline1 = Request.POST.get("addressline1")
state")
if(Request.FILES.get("pic")!=None):
70
buyer.pic = Request.FILES.get("pic")
buyer.save()
return HttpResponseRedirect("/profile/")
return render(Request,"update-profile.html",{'data':buyer})
def logoutPage(Request):
auth.logout(Request)
return HttpResponseRedirect("/login/")
def forgetPasswordPage1(Request):
if(Request.method=="POST"):
username = Request.POST.get("username")
try:
user = Buyer.objects.get(username=username)
otp = randint(100000,999999)
user.otp = otp
is """+str(otp)+"""
Never Share OTP with anyone
Team : E-Cart
"""
email_from = settings.EMAIL_HOST_USER
recipient_list = [user.email, ]
send_mail( subject, message, email_from, recipient_list )
return HttpResponseRedirect("/forget-password-2/")
except:
messages.error(Request,"Invalid Username")
return render(Request,"forget-password-1.html")
def forgetPasswordPage2(Request):
if(Request.method=="POST"):
otp = int(Request.POST.get('otp'))
try:
user = Buyer.objects.get(username=Request.session.get("reset-password-
username",None))
if(otp==user.otp):
return HttpResponseRedirect("/forget-password-3/")
else:
messages.error(Request,"Invalid OTP!!!")
except:
messages.error(Request,"Un-Authorized")
return render(Request,"forget-password-2.html")
def forgetPasswordPage3(Request):
if(Request.method=="POST"):
password = Request.POST.get("password")
cpassword = Request.POST.get("cpassword")
if(password==cpassword):
71
try:
user = User.objects.get(username=Request.session.get("reset-password-
username",None))
user.set_password(password)
user.save()
if(Request.session['reset-password-username']):
del Request.session['reset-password-username']
return HttpResponseRedirect("/login/")
except:
messages.error(Request,"Un-Authorized")
else:
messages.error(Request,"Password and Confirm Password Doesn't Matched!!!")
return render(Request,"forget-password-3.html")
72
main.js
(function ($) {
"use strict";
// Vendor carousel
$('.vendor-carousel').owlCarousel({
loop: true,
margin: 29,
nav: false,
autoplay: true,
smartSpeed: 1000,
responsive: {
0:{
items:2
},
73
576:{
items:3
},
768:{
items:4
},
992:{
items:5
},
1200:{
items:6
}
}
});
// Related carousel
$('.related-carousel').owlCarousel({
loop: true,
margin: 29,
nav: false,
autoplay: true,
smartSpeed: 1000,
responsive: {
0:{
items:1
},
576:{
items:2
},
768:{
items:3
},
992:{
items:4
}
}
});
// Product Quantity
$('.quantity button').on('click', function () {
var button = $(this);
var oldValue = button.parent().parent().find('input').val();
if (button.hasClass('btn-plus')) {
var newVal = parseFloat(oldValue) + 1;
} else {
if (oldValue > 0) {
var newVal = parseFloat(oldValue) - 1;
74
} else {
newVal = 0;
}
}
button.parent().parent().find('input').val(newVal);
});
})(jQuery);
75
style.css
:root {
--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--green: #28a745;
--teal: #20c997;
--cyan: #17a2b8;
--white: #fff;
--gray: #6c757d;
--gray-dark: #343a40;
--primary: #d4d3e8;
--secondary: #F5F5F5;
--success: #28a745;
--info: #17a2b8;
--warning: #ffc107;
--danger: #dc3545;
--light: #FFFFFF;
--dark: #3D464D;
--breakpoint-xs: 0;
--breakpoint-sm: 576px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--font-family-sans-serif: "Roboto", sans-serif;
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
76
display: block;
}
body {
margin: 0;
font-family: "Roboto", sans-serif;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #6C757D;
text-align: left;
background-color: #F5F5F5;
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
77
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
78
sup {
top: -.5em;
}
a {
color: #d4d3e8;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #e6b400;
text-decoration: underline;
}
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
79
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
80
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
81
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
@media (max-width: 1200px) {
legend {
font-size: calc(1.275rem + 0.3vw) ;
}
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
82
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
h1, .h1 {
font-size: 2.5rem;
}
h2, .h2 {
font-size: 2rem;
}
83
h3, .h3 {
font-size: 1.75rem;
}
h4, .h4 {
font-size: 1.5rem;
}
h5, .h5 {
font-size: 1.25rem;
}
h6, .h6 {
font-size: 1rem;
}
.lead {
font-size: 1.25rem;
font-weight: 300;
}
.display-1 {
font-size: 6rem;
font-weight: 300;
line-height: 1.2;
}
.display-2 {
font-size: 5.5rem;
84
font-weight: 300;
line-height: 1.2;
}
.display-3 {
font-size: 4.5rem;
font-weight: 300;
line-height: 1.2;
}
.display-4 {
font-size: 3.5rem;
font-weight: 300;
line-height: 1.2;
}
hr {
margin-top: 1rem;
margin-bottom: 1rem;
border: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
small,
.small {
font-size: 80%;
font-weight: 400;
}
mark,
85
.mark {
padding: 0.2em;
background-color: #fcf8e3;
}
.list-unstyled {
padding-left: 0;
list-style: none;
}
.list-inline {
padding-left: 0;
list-style: none;
}
.list-inline-item {
display: inline-block;
}
.list-inline-item:not(:last-child) {
margin-right: 0.5rem;
}
.initialism {
font-size: 90%;
text-transform: uppercase;
}
.blockquote {
margin-bottom: 1rem;
font-size: 1.25rem;
}
.blockquote-footer {
display: block;
font-size: 80%;
color: #6c757d;
}
.blockquote-footer::before {
content: "\2014\00A0";
}
.img-fluid {
max-width: 100%;
height: auto;
}
86
.img-thumbnail {
padding: 0.25rem;
background-color: #F5F5F5;
border: 1px solid #dee2e6;
max-width: 100%;
height: auto;
}
.figure {
display: inline-block;
}
.figure-img {
margin-bottom: 0.5rem;
line-height: 1;
}
.figure-caption {
font-size: 90%;
color: #6c757d;
}
code {
font-size: 87.5%;
color: #e83e8c;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 87.5%;
color: #fff;
background-color: #212529;
}
kbd kbd {
padding: 0;
font-size: 100%;
font-weight: 700;
}
pre {
display: block;
font-size: 87.5%;
87
color: #212529;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
88
.row {
display: flex;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
.no-gutters {
margin-right: 0;
margin-left: 0;
}
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11,
.col-12, .col,
.col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-
sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm,
.col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7,
.col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md,
.col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7,
.col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg,
.col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7,
.col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl,
.col-xl-auto {
position: relative;
width: 100%;
padding-right: 15px;
padding-left: 15px;
}
.col {
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
}
.row-cols-1 > * {
flex: 0 0 100%;
max-width: 100%;
}
89
.row-cols-2 > * {
flex: 0 0 50%;
max-width: 50%;
}
.row-cols-3 > * {
flex: 0 0 33.33333%;
max-width: 33.33333%;
}
.row-cols-4 > * {
flex: 0 0 25%;
max-width: 25%;
}
.row-cols-5 > * {
flex: 0 0 20%;
max-width: 20%;
}
.row-cols-6 > * {
flex: 0 0 16.66667%;
max-width: 16.66667%;
}
.col-auto {
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-1 {
flex: 0 0 8.33333%;
max-width: 8.33333%;
}
.col-2 {
flex: 0 0 16.66667%;
max-width: 16.66667%;
}
.col-3 {
flex: 0 0 25%;
max-width: 25%;
}
.col-4 {
flex: 0 0 33.33333%;
90
max-width: 33.33333%;
}
.col-5 {
flex: 0 0 41.66667%;
max-width: 41.66667%;
}
.col-6 {
flex: 0 0 50%;
max-width: 50%;
}
.col-7 {
flex: 0 0 58.33333%;
max-width: 58.33333%;
}
.col-8 {
flex: 0 0 66.66667%;
max-width: 66.66667%;
}
.col-9 {
flex: 0 0 75%;
max-width: 75%;
}
.col-10 {
flex: 0 0 83.33333%;
max-width: 83.33333%;
}
.col-11 {
flex: 0 0 91.66667%;
max-width: 91.66667%;
}
.col-12 {
flex: 0 0 100%;
max-width: 100%;
}
.order-first {
order: -1;
}
.order-last {
91
order: 13;
}
.order-0 {
order: 0;
}
.order-1 {
order: 1;
}
.order-2 {
order: 2;
}
.order-3 {
order: 3;
}
.order-4 {
order: 4;
}
.order-5 {
order: 5;
}
.order-6 {
order: 6;
}
.order-7 {
order: 7;
}
.order-8 {
order: 8;
}
.order-9 {
order: 9;
}
.order-10 {
order: 10;
}
.order-11 {
92
order: 11;
}
.order-12 {
order: 12;
}
.offset-1 {
margin-left: 8.33333%;
}
.offset-2 {
margin-left: 16.66667%;
}
.offset-3 {
margin-left: 25%;
}
.offset-4 {
margin-left: 33.33333%;
}
.offset-5 {
margin-left: 41.66667%;
}
.offset-6 {
margin-left: 50%;
}
.offset-7 {
margin-left: 58.33333%;
}
.offset-8 {
margin-left: 66.66667%;
}
.offset-9 {
margin-left: 75%;
}
.offset-10 {
margin-left: 83.33333%;
}
.offset-11
93
SCREEN SHOTS
Home Page:-
94
Latest Products:-
95
Company Logo:-
96
Cart Page:-
97
Contact Page:-
98
Profile Page:-
99
100
Login Page:-
101
Sign Up Page:-
102
Use strong passwords. Strong passwords are vital to good online security
Put up a firewall
Raise awareness
103
TESTING
Software testing is the act of examining the artifacts and the behavior of the software
under test by validation and verification. Software testing can also provide an objective,
independent view of the software to allow the business to appreciate and understand
the risks of software implementation. Test techniques include, but not necessarily
limited to:
104
UNIT TESTING
Unit testing involves the testing of each unit or an individual component of the software application. It
is the first level of functional testing. The aim behind unit testing is to validate unit components with its
performance.
A unit is a single testable part of a software system and tested during the development phase of the
application software.
The purpose of unit testing is to test the correctness of isolated code. A unit component is an
individual function or code of the application. White box testing approach used for unit testing and
usually done by the developers.
Whenever the application is ready and given to the Test engineer, he/she will start checking every
component of the module or module of the application independently or one by one, and this process
is known as Unit testing or components testing.
o Unit testing helps tester and developers to understand the base of code that makes them able
to change defect causing code quickly.
o Unit testing helps in the documentation.
o Unit testing fixes defects very early in the development phase that's why there is a possibility to
occur a smaller number of defects in upcoming testing levels.
o It helps with code reusability by migrating code and test cases.
105
SYSTEM TESTING
106
OBJECTIVE OF TESTING
107
FUTURE SCOPE:-
So, the scope of e-commerce businesses is largely a mobile-first approach. Those that
haven't made their e-stores mobile-friendly would be losing a lot of business
opportunities. A big part of making your e-store website mobile-friendly is ensuring its
responsiveness.
The growth of digital commerce represents a permanent change in how people shop. In fact, Morgan
Stanley's industry model, along with other data, suggests that e-commerce will continue to gain
traction, even in countries where online shopping is already popular
In this article, we will look at 7 ways in which you can improve the customer experience
for your E-commerce store.
Delight Your Customers. ...
Surprise Your Shoppers! ...
Build a Community. ...
Up Your Social Media Game. ...
Follow an impactful Content Strategy. ...
Deliver an Omni channel Customer experience. ...
Personalize Customer Experience.
108
109
BIBLIOGRAPHY
http://www.w3schools.com/html/defualt.asp,
http://www.w3schools.com/css/default.asp,
http://www.w3schools.com/bootstrap/default.asp
http://www.w3schools.com/tailwindcss/default.asp
http://www.w3schools.com/materialui/default.asp
http://www.w3schools.com/js/default.asp,
http://www.w3schools.com/python/defualt.asp,
http://www.w3schools.com/mysql/default.asp,
http://www.w3schools.com/django/default.asp
110