Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
42 views111 pages

E-Commerce Website Project Report

Final year project report of e-commerce website using django

Uploaded by

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

E-Commerce Website Project Report

Final year project report of e-commerce website using django

Uploaded by

LOVE GARG
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 111

lOMoARcPSD|19292886

Major Project File

B.tech (Dr. A.P.J. Abdul Kalam Technical University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by LOVE GARG ([email protected])
lOMoARcPSD|19292886

PROJECT ON E-COMMERCE WEBSITE (E-cart)

PROJECT REPORT OF MAJOR PROJECT SUBMITTED FOR FULFILLMENT


OF THE REQUIREMENT FOR THE DEGREE OF BACHELOR OF
TECHNOLOGY

MAJOR PROJECT REPORT


(2022-23)
RAVENDRA SINGH
University Roll no: 1905180100011
Under the supervision of
Mr. Abhishek Varshney
Department of Computer Science & Engineering

AT.
SSLD VARSHNEY ENGINEERING COLLEGE
Affiliated to:
DR. APJ ABDUL KALAM TECHNICAL UNIVERSITY

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

TABLE OF CONTENTS

SR NO. Page No.

1. INDRODUCTION AND OBJECTIVE OF PROJECT...................................4


2. ACKNOWLEDGEMENT………………………………………………………………………….5
3. CERTIFICATE………………………………………………………………………………………..6
4. ABSTRACT…………………………………………………………………………………………..7
5. PROJECT CATEGORY & TOOLS/PLATFORM………………………………………….8
I. Software Specification……………………………………………………………….8
II. Hardware Specification………………………………………………………………8
III. Overview of Django Framework…………………………………………………9
IV. Visual Studio ……………………………………………………………………………..11
V. Database……………………………………………………………………………………12
VI. RDBMS………………………………………………………………………………………14
6. PROBLEM DEFINITION……………………………………………………………………….15
I. Problem Analysis………………………………………………………………………15
7. REQUIREMENT SPECIFICATION………………………………………………………….16
I. Functional Requirement…………………………………………………………..16
II. Non Functional Requirement……………………………………………………16
8. SCOPE OF THE SOLUTION………………………………………………………………….17
I. Features…………………………………………………………………………………..17
9. DFD DIAGRAM………………………………………………………………………………….18
10.DATABASE TABLE……………………………………………………………………………..21
11.WORKING…………………………………………………………………………………………24
12.WEBSITE DESCRIPTION……………………………………………………………………..25

13. DESIGN CODE…………………………………………………………………………………..26


14. SCREEN SHOTS…………………………………………………………………………………94

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

15.SYSTEM SECURITY MEASURES……………………………………………………………103

16.TESTING…………………………………………………………………………………………….104

17.UNIT TESTING…………………………………………………………………………………….105

18.SYSTEM TESTING………………………………………………………………………………..106

19.OBJECTIVE OF TESTING……………………………………………………………………….107

20.FUTURE SCOPE & FURTHER ENHANCEMENT OF THE PROJECT……………108

21.CONCLUSION OF THE PROJECT……………………………………………………………109

22.BIBLIOGRAPHY…………………………………………………………………………………….110

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

INDRODUCTION AND OBJECTIVE OF PROJECT

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.

Profit maximization is the core aim of any organization whether it is


a physical business place or the one that runs online. Some
organizations even aim to survive with just less or no profit at
all. Breakeven, one method of surviving is to focus on breaking even
over a certain period. This means making enough money to cover
the total costs involved in producing and selling the goods or
services, and running the business, although there is no profit, no
money is lost. Also there are some businesses that only tend to
focus on selling (sales maximization) as more products as possible
in order to expansion in their business.

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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 consider myself privileged to express my gratitude and respect towards all


those who guided us through the project, “E-Commerce Website”.

I would like to express my profuse gratitude to Mr. Gyanendra Kumar, for


giving us the support, encouragement and providing us the required lab facilities
that was necessary for the completion of this project.

As a token of gratitude, I would like to acknowledge my sincere gratefulness


to the internal guide Mr. Abhishek Varshney for her unlimited support and
encouragement provided throughout the process.

I also express my gratitude and sincere thanks to all the teaching and non-
teaching staff of Computer Science & Engineering Department.

Finally, yet importantly, I would like to express my heartfelt thanks to my


beloved Parents for their blessings and my Friends for their help and wishes for
the successful completion of this project report.

Ravendra Singh
(B.Tech – IV Year, VIII Sem)

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

CERTIFICATE

This Is to certify that Ravendra Singh of class Btech (4th Yr CSE)


has successfully completed his computer science project on “E-
Commerce Website (E-cart)” under the guidance of Mr.
Abhishek Varshney in partial fulfillment of Major Project
Curriculum during the session 2023-24.

Concern Faculty (HOD)

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

ABSTRACT

Recently the e-commerce platform is playing an important role in some


areas; its activities are a subset of e-business activities.

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.

For implement the selling online website, it needs to use current


technologies to achieve this goal. As a first stage, it should setting up online
ecommerce store with easy-to-use. Then improve the customer experience,
and lastly implement the Direct Online Sale between business to consumer
by implement electronic payment methods.

All these techniques should be based on deliberated plan according to


strategy of electronic commerce with implement the current technology to
ensure a good revenue to the company.

The primary goal of e-commerce is to reach maximum customers


at the right time to increase sales and profitability of the
business. Functions of e-commerce include buying and selling
goods, transmitting funds or data over the internet.

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

PROJECT CATEGORY & TOOLS/PLATFORM

Software Specification:-

Front –End Tool :-


i. HTML
ii. CSS
iii. JAVA SCRIPT
iv. BOOTSTRAP

Back End Tool:-

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Overview of Django Framework

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 is a high-level Python web framework that enables rapid development of


secure and maintainable websites. Built by experienced developers, Django takes care
of much of the hassle of web development, so you can focus on writing your app
without needing to reinvent the wheel. It is free and open source, has a thriving and
active community, great documentation, and many options for free and paid-for
support.

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.

Django helps developers avoid many common security mistakes by providing a


framework that has been engineered to "do the right things" to protect the website
automatically. For example, Django provides a secure way to manage user accounts
and passwords, avoiding common mistakes like putting session information in cookies
9

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Visual Studio:-
Visual Studio Code has some very unique features. They are listed as below :

 Support for multiple programming languages: Supports multiple programming languages. So

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-

language reference, it’ll be able to detect it easily.

 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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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.

SQLite has the following noticeable features: self-contained, serverless, zero-configuration,


transactional.

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.

The following diagram illustrates the RDBMS client/server architecture:

SQLite does NOT work this way.

SQLite does NOT require a server to run.

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

RDBMS:-

A relational database management system (RDBMS) is a collection of programs and


capabilities that enable IT teams and others to create, update, administer and otherwise
interact with a relational database. RDBM store data in the form of tables, with most
commercial relational database management systems using SQL to access the database.
However, since SQL was invented after the initial development of the relational model, it is
not necessary for RDBMS use.

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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.

 6 key functionalities of a successful website.


 The mobile-first approach.

 The power of personalization.


 Provide seamless customer journeys.
 User-friendly navigation.
 Third-party integrations.

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.

The most common ones are -

i. Performance
ii. Scalability
iii. Portability
iv. Compatibility
v. Reliability
vi. Availability
vii. Maintainability
viii. Security
ix. Localization
16

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

SCOPE OF SOLUTION

All transactions would be handled electronically or online – e-commerce facilitates all


the various shopping-related activities, including the purchase and sales of goods and
services, shipping, billing, etc. online. The kind of e-commerce model that we will be
discussing here would majorly revolve around B2C.

Features:-

 Easy-to-navigate product catalogs. ...


 Rich, real-time product information. ...
 Complex pricing rules made simple. ...
 Online order processing. ...
 Superior customer service. ...
 Personalized e-commerce marketing.
 Ubiquity. This pretty much means that it happens everywhere. ...
 Global reach. As I mentioned earlier, e-commerce is everything. ...
 Universal standards. EASE. ...
 Information richness. ...
 Interactivity. ...
 Information density. ...
 Personalization. ...
 Social technology.

17

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

DFD DIAGRAMS

Login DFD: -

18

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Registration DFD :-

19

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Level 1 DFD:-

20

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

WORKING

1. A potential customer navigates to an ecommerce website, whether via search


engines, paid advertisements, referral traffic, etc.
2. The ecommerce website connects to its database, which contains tons of data
about the website’s categories, products, product dimensions and weight, articles
and content, images, etc. The website requests this data to dynamically render any
requested web pages.
3. After browsing the ecommerce website, a potential customer adds a product or
service to their virtual shopping cart and decides to check out.
4. The shopper completes the checkout process and finalizes the transaction.
5. The shopper’s credit card information is encrypted and sent to a Payment Gateway
(PayPal, for example) to handle the credit card processing securely and remotely.
6. Once the order is complete, and the payment has gone through, the website
typically provides an estimated shipping time, a unique transaction number, postal
tracking number, etc. Most of these processes are automated and part of a good
ecommerce website’s core functionality.
7. As transactions take place, orders are stored in the website admin and sent to an
order fulfillment team. Order fulfillment can be done in-house or by a third-party
company/drop shipper.

24

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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.

Ecommerce website features:-


 Responsive Website Design. ...
 User-Friendly Navigation. ...
 Multiple Security Features. ...
 Shopping Cart and Checkout Buttons. ...

 Offer Multiple Payment Options. ...


 Detailed Shipping and Return Information. ...
 High-Quality Photos. ...
 Contact Page with Multiple Contact Options.

25

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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">

<!-- Favicon -->


<link href="img/favicon.ico" rel="icon">

<!-- Google Web Fonts -->


<link rel="preconnect" href="https://fonts.gstatic.com">
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet">

<!-- Font Awesome -->


<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css"
rel="stylesheet">

<!-- Libraries Stylesheet -->


<link href="/static/lib/animate/animate.min.css" rel="stylesheet">
<link href="/static/lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">

<!-- Customized Bootstrap Stylesheet -->


<link href="/static/css/style.css" rel="stylesheet">
</head>

<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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

</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 -->

<!-- Navbar Start -->


<div class="container-fluid bg-dark mb-30 sticky-top">
<div class="row px-xl-5">
<div class="col-lg-3 d-none d-lg-block">
<a class="btn d-flex align-items-center justify-content-between bg-primary w-
100" data-toggle="collapse" href="#navbar-vertical" style="height: 65px; padding: 0 30px;">
<h6 class="text-dark m-0"><i class="fa fa-bars mr-2"></i>Categories</h6>
<i class="fa fa-angle-down text-dark"></i>
</a>
<nav class="collapse position-absolute navbar navbar-vertical navbar-light
align-items-start p-0 bg-light" id="navbar-vertical" style="width: calc(100% - 30px); z-
index: 999;">
<div class="navbar-nav w-100">
<div class="nav-item dropdown dropright">
<a href="#" class="nav-link dropdown-toggle" data-
toggle="dropdown">Maincategory <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.maincategory %}
<a href="/shop/{{item}}/All/All" class="dropdown-
item">{{item}}</a>
{% endfor %}
</div>

27

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

</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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<div class="nav-item dropdown">


<a href="#" class="nav-link dropdown-toggle" data-
toggle="dropdown"><span style="text-transform: capitalize;">{{request.user.username}}</span>
<i class="fa fa-angle-down mt-1"></i></a>
<div class="dropdown-menu bg-primary rounded-0 border-0 m-0">
<a href="/profile/" class="dropdown-item">Profile</a>
<a href="/cart/" class="dropdown-item">Cart</a>
<a href="/logout/" class="dropdown-item">Logout</a>
</div>
</div>
{% else %}
<a href="/login/" class="nav-item nav-link">Login</a>
{% endif %}
</div>
<div class="navbar-nav ml-auto py-0 d-none d-lg-block">
<a href="/cart/" class="btn px-0 ml-3">
<i class="fas fa-shopping-cart text-primary"></i>
<span class="badge text-secondary border border-secondary
rounded-circle" style="padding-bottom: 2px;">{{request.session.count}}</span>
</a>
</div>
</div>
</nav>
</div>
</div>
</div>
<!-- Navbar End -->

{% 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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<div class="p-3" style="max-width: 700px;">


<h1 class="display-4 text-white mb-3 animate__animated
animate__fadeInDown">Men Fashion</h1>
<p class="mx-md-5 px-5 animate__animated
animate__bounceIn">Lorem rebum magna amet lorem magna erat diam stet. Sadips duo stet amet
amet ndiam elitr ipsum diam</p>
<a class="btn btn-outline-light py-2 px-4 mt-3
animate__animated animate__fadeInUp" href="/shop/Male/All/All/">Shop Now</a>
</div>
</div>
</div>
<div class="carousel-item position-relative" style="height: 430px;">
<img class="position-absolute w-100 h-100"
src="/static/img/carousel-2.jpg" style="object-fit: cover;">
<div class="carousel-caption d-flex flex-column align-items-
center justify-content-center">
<div class="p-3" style="max-width: 700px;">
<h1 class="display-4 text-white mb-3 animate__animated
animate__fadeInDown">Women Fashion</h1>
<p class="mx-md-5 px-5 animate__animated
animate__bounceIn">Lorem rebum magna amet lorem magna erat diam stet. Sadips duo stet amet
amet ndiam elitr ipsum diam</p>
<a class="btn btn-outline-light py-2 px-4 mt-3
animate__animated animate__fadeInUp" href="/shop/Female/All/All/">Shop Now</a>
</div>
</div>
</div>
<div class="carousel-item position-relative" style="height: 430px;">
<img class="position-absolute w-100 h-100"
src="/static/img/carousel-3.jpg" style="object-fit: cover;">
<div class="carousel-caption d-flex flex-column align-items-
center justify-content-center">
<div class="p-3" style="max-width: 700px;">
<h1 class="display-4 text-white mb-3 animate__animated
animate__fadeInDown">Kids Fashion</h1>
<p class="mx-md-5 px-5 animate__animated
animate__bounceIn">Lorem rebum magna amet lorem magna erat diam stet. Sadips duo stet amet
amet ndiam elitr ipsum diam</p>
<a class="btn btn-outline-light py-2 px-4 mt-3
animate__animated animate__fadeInUp" href="/shop/Kids/All/All/">Shop Now</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Products Start -->
<div class="container-fluid pt-5 pb-3">

30

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<h2 class="section-title position-relative text-uppercase mx-xl-5 mb-4 text-


center"><span class="bg-secondary pr-3">Latest Products</span></h2>
<div class="row px-xl-5">
{% for item in products %}
<div class="col-lg-3 col-md-4 col-sm-6 pb-1">
<div class="product-item bg-light mb-4">
<div class="product-img position-relative overflow-hidden">
<a href="/single-product/{{item.id}}">
<img class="w-100" src={{item.pic1.url}} height="250px" alt="">
</a>
</div>
<div class="text-center py-4">
<a class="h6 text-decoration-none text-truncate" href="/single-
product/{{item.id}}">{{item.name}}</a>
<div class="d-flex align-items-center justify-content-center mt-2">
<h5>&#8377;{{item.finalprice}}</h5><h6 class="text-muted ml-
2"><del class="text-danger">&#8377;{{item.baseprice}}</del> <sup class="text-
success">{{item.discount}}% Off</sup></h6>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- Products End -->

<!-- Vendor Start -->


<div class="container-fluid py-5">
<div class="row px-xl-5">
<div class="col">
<div class="owl-carousel vendor-carousel">
{% for item in brands %}
<div class="bg-light p-4">
<a href="/shop/All/All/{{item.name}}/">
<img src="{{item.pic.url}}" height="100px" alt="">
</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<!-- Vendor End -->
{% endblock %}

<!-- Footer Start -->


<div class="container-fluid bg-dark text-secondary mt-5 pt-5">

31

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<div class="row px-xl-5 pt-5">


<div class="col-lg-4 col-md-12 mb-5 pr-3 pr-xl-5">
<h5 class="text-secondary text-uppercase mb-4">Get In Touch</h5>
<p class="mb-4">No dolore ipsum accusam no lorem. Invidunt sed clita kasd
clita et et dolor sed dolor. Rebum tempor no vero est magna amet no</p>
<p class="mb-2"><i class="fa fa-map-marker-alt text-primary mr-
3"></i>Kaimganj , India</p>
<p class="mb-2"><i class="fa fa-envelope text-primary mr-3"></i><a
href="mailto:[email protected]">[email protected]</a></p>
<p class="mb-0"><i class="fa fa-phone-alt text-primary mr-3"></i><a
href="tel:9873848046">+91-803326227</a></p>
</div>
<div class="col-lg-8 col-md-12">
<div class="row">
<div class="col-md-4 mb-5">
<h5 class="text-secondary text-uppercase mb-4">Menu</h5>
<div class="d-flex flex-column justify-content-start">
<a class="text-secondary mb-2" href="/"><i class="fa fa-angle-
right mr-2"></i>Home</a>
<a class="text-secondary mb-2" href="/shop/"><i class="fa fa-
angle-right mr-2"></i>Our Shop</a>
<a class="text-secondary mb-2" href="/single-product/"><i
class="fa fa-angle-right mr-2"></i>Shop Detail</a>
<a class="text-secondary mb-2" href="/cart/"><i class="fa fa-
angle-right mr-2"></i>Shopping Cart</a>
<a class="text-secondary mb-2" href="/checkout/"><i class="fa fa-
angle-right mr-2"></i>Checkout</a>
<a class="text-secondary" href="/contact/"><i class="fa fa-angle-
right mr-2"></i>Contact Us</a>
</div>
</div>
<div class="col-md-8 mb-5">
<h5 class="text-secondary text-uppercase mb-4">Newsletter</h5>
<p>Duo stet tempor ipsum sit amet magna ipsum tempor est</p>
<form action="">
<div class="input-group">
<input type="text" class="form-control" placeholder="Your
Email Address">
<div class="input-group-append">
<button class="btn btn-primary">Sign Up</button>
</div>
</div>
</form>
<h6 class="text-secondary text-uppercase mt-4 mb-3">Follow Us</h6>
<div class="d-flex">
<a class="btn btn-primary btn-square mr-2" href="#"><i class="fab
fa-twitter"></i></a>

32

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<a class="btn btn-primary btn-square mr-2" href="#"><i class="fab


fa-facebook-f"></i></a>
<a class="btn btn-primary btn-square mr-2" href="#"><i class="fab
fa-linkedin-in"></i></a>
<a class="btn btn-primary btn-square" href="#"><i class="fab fa-
instagram"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer End -->

<!-- Back to Top -->


<a href="#" class="btn btn-primary back-to-top"><i class="fa fa-angle-double-up"></i></a>

<!-- JavaScript Libraries -->


<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"></script>
<script src="/static/lib/easing/easing.min.js"></script>
<script src="/static/lib/owlcarousel/owl.carousel.min.js"></script>

<!-- Contact Javascript File -->


<script src="/static/mail/jqBootstrapValidation.min.js"></script>
<script src="/static/mail/contact.js"></script>

<!-- Template Javascript -->


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

</html>

33

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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 -->

<!-- Shop Start -->


<div class="container-fluid">
<div class="row px-xl-5">
<!-- Shop Sidebar Start -->
<div class="col-lg-3 col-md-4">
<!-- Price Start -->
<h5 class="section-title position-relative text-uppercase mb-3"><span
class="bg-secondary pr-3">Filter by price</span></h5>
<div class="bg-light p-4 mb-30">
<form action="/price-filter/{{mc}}/{{sc}}/{{br}}/" method="post">
{% csrf_token %}
<div class="custom-control custom-checkbox d-flex align-items-center
justify-content-between mb-3">
<input type="radio" class="custom-control-input" checked
name="price" value="1" id="price-all">
<label class="custom-control-label" for="price-all">All
Price</label>
</div>
<div class="custom-control custom-checkbox d-flex align-items-center
justify-content-between mb-3">
<input type="radio" class="custom-control-input" name="price"
value="2" id="price-1">
<label class="custom-control-label" for="price-1">&#8377;0 -
&#8377;1000</label>
</div>
34

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<div class="custom-control custom-checkbox d-flex align-items-center


justify-content-between mb-3">
<input type="radio" class="custom-control-input" name="price"
value="3" id="price-2">
<label class="custom-control-label" for="price-2">&#8377;1000 -
&#8377;2000</label>
</div>
<div class="custom-control custom-checkbox d-flex align-items-center
justify-content-between mb-3">
<input type="radio" class="custom-control-input" name="price"
value="4" id="price-3">
<label class="custom-control-label" for="price-3">&#8377;2000 -
&#8377;3000</label>
</div>
<div class="custom-control custom-checkbox d-flex align-items-center
justify-content-between mb-3">
<input type="radio" class="custom-control-input" name="price"
value="5" id="price-4">
<label class="custom-control-label" for="price-4">&#8377;3000 -
&#8377;4000</label>
</div>
<div class="custom-control custom-checkbox d-flex align-items-center
justify-content-between mb-3">
<input type="radio" class="custom-control-input" name="price"
value="6" id="price-5">
<label class="custom-control-label" for="price-5">&#8377;4000 -
&#8377;5000</label>
</div>
<div class="custom-control custom-checkbox d-flex align-items-center
justify-content-between">
<input type="radio" class="custom-control-input" name="price"
value="7" id="price-6">
<label class="custom-control-label" for="price-6">More Then
&#8377;5000</label>
</div>
<div class="my-3">
<button type="submit" class="btn btn-primary btn-sm w-100">Apply
Filter</button>
</div>
</form>
</div>
<!-- Price End -->

</div>
<!-- Shop Sidebar End -->

35

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<!-- Shop Product Start -->


<div class="col-lg-9 col-md-8">
<div class="row pb-3">
<div class="col-12 pb-1">
<div class="d-flex align-items-center justify-content-between mb-4">
<div>
<div class="btn-group">
<button type="button" class="btn btn-sm btn-light
dropdown-toggle" data-toggle="dropdown">Maincategory</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item"
href="/shop/All/{{sc}}/{{br}}/">All</a>
{% for item in maincategories %}
<a class="dropdown-item"
href="/shop/{{item.name}}/{{sc}}/{{br}}/">{{item.name}}</a>
{% endfor %}
</div>
</div>
<div class="btn-group">
<button type="button" class="btn btn-sm btn-light
dropdown-toggle" data-toggle="dropdown">Subcategory</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item"
href="/shop/{{mc}}/All/{{br}}/">All</a>
{% for item in subcategories %}
<a class="dropdown-item"
href="/shop/{{mc}}/{{item.name}}/{{br}}/">{{item.name}}</a>
{% endfor %}
</div>
</div>
<div class="btn-group">
<button type="button" class="btn btn-sm btn-light
dropdown-toggle" data-toggle="dropdown">Brand</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item"
href="/shop/{{mc}}/{{sc}}/All/">All</a>
{% for item in brands %}
<a class="dropdown-item"
href="/shop/{{mc}}/{{sc}}/{{item.name}}/">{{item.name}}</a>
{% endfor %}
</div>
</div>
</div>
<div class="ml-2">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-light
dropdown-toggle" data-toggle="dropdown">Sorting</button>
<div class="dropdown-menu dropdown-menu-right">

36

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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 -->

<!-- Cart Start -->


<div class="container-fluid">
{% if request.session.count %}
<div class="row px-xl-5">
<div class="col-lg-9 table-responsive mb-5">
<table class="table table-light table-borderless table-hover text-center mb-
0">
<thead class="thead-dark">
<tr>
<th></th>
<th>Name</th>
<th>Brand/Color/Size</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
<th>Remove</th>
</tr>
</thead>
<tbody class="align-middle">
{% for key,value in cart.items %}
<tr>
<td class="align-middle"><a href="{{value.pic}}"
target="_blank"><img src="{{value.pic}}" alt="" style="width: 70px;height:70px"></a></td>
<td class="align-middle">{{value.name}}</td>
38

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<td class="align-
middle">{{value.brand}}/{{value.color}}/{{value.size}}</td>
<td class="align-middle">&#8377;{{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">&#8377;{{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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Contact.html

{% extends 'index.html' %}
{% load static %}

{% block title %}
<title>ECart - Contact</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">Contact</span>
</nav>
</div>
</div>
</div>
<!-- Breadcrumb End -->

<!-- Contact Start -->


<div class="container-fluid">
<h2 class="text-center section-title position-relative text-uppercase mx-xl-5 mb-4"><span
class="bg-secondary pr-3">Contact Us</span></h2>
<div class="row px-xl-5">
<div class="col-lg-7 mb-5">
<div class="contact-form bg-light p-30">
<div>
{% for m in messages %}
<p class="text-center bg-success text-light p-2">
{{m}}
</p>
{% endfor %}
</div>
<form action="/contact/" method="post">
{% csrf_token %}
<div class="control-group mb-2">
<input type="text" class="form-control" name="name" placeholder="Your
Name" required />
</div>
<div class="control-group mb-2">
<input type="email" class="form-control" name="email"
placeholder="Your Email" required />

40

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

</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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Checkout.html:-

{% extends 'index.html' %}
{% load static %}

{% block title %}
<title>ECart - Checkout</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">Checkout</span>
</nav>
</div>
</div>
</div>
<!-- Breadcrumb End -->

<!-- Checkout Start -->


<div class="container-fluid">
<div class="row px-xl-5">
<div class="col-md-6">
<h5 class="section-title position-relative text-uppercase mb-3 text-
center"><span class="bg-secondary pr-3">Billing Address</span></h5>
<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>Name</th>
<td>{{buyer.name}}</td>
</tr>
<tr>
<th>UserName</th>
<td>{{buyer.username}}</td>
</tr>
<tr>
<th>Email</th>
<td>{{buyer.email}}</td>
</tr>
<tr>
<th>Phone</th>

42

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<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}}(&#8377;{{value.price}}X{{value.qty}})</p>
<p>&#8377;{{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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<form action="/place-order/" method="post">


{% csrf_token %}
<div class="bg-light p-30">
<div class="form-group">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input"
name="mode" id="cod" value="COD" checked>
<label class="custom-control-label" for="cod">COD</label>
</div>
</div>
<div class="form-group">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input"
name="mode" id="netbanking" value="Netbanking">
<label class="custom-control-label"
for="netbanking">NetBanking/Card/UPI</label>
</div>
</div>
<button class="btn btn-block btn-primary btn-sm font-weight-bold
py-3" type="submit">Place Order</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Checkout End -->

{% endblock %}

44

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Details.html

{% extends 'index.html' %}
{% load static %}

{% block title %}
<title>ECart - Single Product</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">Product Detail</span>
</nav>
</div>
</div>
</div>
<!-- Breadcrumb End -->

<!-- Shop Detail Start -->


<div class="container-fluid pb-5">
<div class="row px-xl-5">
<div class="col-lg-5 mb-30">
<div id="product-carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner bg-light">
<div class="carousel-item active">
<img class="w-100" src="{{data.pic1.url}}" height="500px"
alt="Image">
</div>
<div class="carousel-item">
{% if data.pic2 %}
<img class="w-100" src="{{data.pic2.url}}" height="500px"
alt="Image">
{% endif %}
</div>
<div class="carousel-item">
{% if data.pic3 %}
<img class="w-100" src="{{data.pic3.url}}" height="500px"
alt="Image">
{% endif %}
</div>
<div class="carousel-item">
46

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

{% 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>

<!-- Products Start -->


<div class="container-fluid py-1">
<h2 class="text-center section-title position-relative text-uppercase mx-xl-5 mb-
4"><span class="bg-secondary pr-3">You May Also Like</span></h2>
<div class="row px-xl-5">
<div class="col">
<div class="owl-carousel related-carousel">

{% for item in relatedProducts %}

<div class="product-item bg-light">

<div class="product-img position-relative overflow-hidden">


<a href="/single-product/{{item.id}}">
<img class="" src="{{item.pic1.url}}" style="height:250px"
width="100%" alt="">
</a>
</div>
<div class="text-center py-4">
<a class="h6 text-decoration-none text-truncate" href="/single-
product/{{item.id}}">{{item.name}}</a>
<div class="d-flex align-items-center justify-content-center mt-
2">

<h5>&#8377;{{item.finalprice}}</h5><h6 class="text-muted ml-


2"><del class="text-danger">&#8377;{{item.baseprice}}</del> <sup class="text-
success">{{item.discount}}% OFF</sup></h6>
</div>
</div>
</div>
{% endfor %}

47

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

</div>
</div>
</div>
</div>
<!-- Products End -->

{% endblock %}

48

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Forget.html

{% extends 'index.html' %}
{% load static %}

{% block title %}
<title>ECart - Forget Password</title>
{% endblock %}
{% block body %}

<div class="container-fluid w-100">


<div class="w-50 m-auto">
<h5 class="text-center bg-primary p-2"><span class="text-success">Reset</span>
Password</h5>
{% for mes in messages %}
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
{{n}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endfor%}
<form action="/forget-password-1/" method="post">
{% csrf_token %}
<div class="mb-3">
<label>Username</label>
<input type="text" name="username" placeholder="User Name to Reset Password"
class="form-control">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary w-100">Send OTP</button>
</div>
</form>
</div>
</div>

{% endblock %}

49

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Forget2.html

{% extends 'index.html' %}
{% load static %}

{% block title %}
<title>ECart - Forget Password</title>
{% endblock %}
{% block body %}

<div class="container-fluid w-100">


<div class="w-50 m-auto">
<h5 class="text-center bg-primary p-2"><span class="text-success">set</span>
Password</h5>
{% for mes in messages %}
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
{{n}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endfor%}
<form action="/forget-password-2/" method="post">
{% csrf_token %}
<div class="mb-3">
<label>OTP</label>
<input type="number" name="name" placeholder="Submit OTP Which is Sent on
Your Registered Email Address : " class="form-control">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary w-100">Submit OTP</button>
</div>
</form>
</div>
</div>

{% endblock %}

50

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Profile.html

{% extends 'index.html' %}
{% load static %}
{% load myCustomFilters %}

{% block title %}
<title>ECart - Buyer Profile</title>
{% endblock %}
{% block body %}

<div class="container-fluid my-3">


<div class="row">
<div class="col-md-6">
{% if data.pic %}
<img src="{{data.pic.url}}" height="600px" width="100%" alt="">
{% else %}
<img src="/static/img/noimage.png" height="600px" width="100%" alt="">
{% endif %}
</div>
<div class="col-md-6">
<h5 class="bg-primary text-center p-1">Buyer Profile</h5>
<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>Name</th>
<td>{{data.name}}</td>
</tr>
<tr>
<th>UserName</th>
<td>{{data.username}}</td>
</tr>
<tr>
<th>Email</th>
<td>{{data.email}}</td>
</tr>
<tr>
<th>Phone</th>
<td>{{data.phone}}</td>
</tr>
<tr>
<th>Address Line 1</th>
<td>{{data.addressline1}}</td>
</tr>
<tr>
<th>Address Line 2</th>
<td>{{data.addressline2}}</td>
</tr>
52

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<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>&#8377;{{item.product.finalprice}}</td>
<td><a href="/single-product/{{item.product.id}}"><i class="fa fa-shopping-
cart text-success"></i></a>

53

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

</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 %}

<h5 class="bg-primary text-center p-2">Your Orders</h5>


{% if orders %}
<div class="row">
{% for item in orders %}
<div class="col-md-5">
<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>Order Id</th>
<td>{{item.checkout.id}}</td>
</tr>
<tr>
<th>Payment Mode</th>
<td>{{Request|paymentModeFilter:item.checkout.paymentMode}}</td>
</tr>
<tr>
<th>Payment Status</th>
<td>{{request|paymentStatusFilter:item.checkout.paymentStatus}}
{% if Request|checkForRepayment:item.checkout %}
<a href="/re-payment/{{item.checkout.id}}/" class="btn btn-
primary">Pay Now</a>
{% endif %}
</td>
</tr>
<tr>
<th>Order Status</th>
<td>{{Request|orderStatusFilter:item.checkout.orderStatus}}</td>
</tr>
<tr>
<th>Subtotal</th>
<td>&#8377;{{item.checkout.subtotal}}</td>
</tr>
<tr>

54

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<th>Shipping</th>
<td>&#8377;{{item.shipping}}</td>
</tr>
<tr>
<th>Final</th>
<td>&#8377;{{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>&#8377;{{cp.i.finalprice}}</td>

<td>{{cp.qty}}</td>
<td>&#8377;{{cp.total}}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="text-center">
<p>No Order History Found!!!</p>

55

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<a href="/shop /" class="btn btn-primary">Shop Now</a>


</div>
{% endif %}
</div>

{% endblock %}

56

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Signup.html

{% extends 'index.html' %}
{% load static %}

{% block title %}
<title>ECart - Signup</title>
{% endblock %}
{% block body %}

<div class="container-fluid w-100">


<div class="w-75 m-auto">
<h5 class="text-center bg-primary p-2"><span class="text-success">Create</span> A
Free Account</h5>
{% for m in messages %}
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
{{m}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endfor%}
<form action="/signup/" method="post">
{% csrf_token %}
<div class="row mb-3">
<div class="col-md-6">
<label>Name</label>
<input type="text" required name="n" placeholder="Full Name" class="form-
control">
</div>
<div class="col-md-6">
<label>Username</label>
<input type="text" required name="username" placeholder="User Name"
class="form-control">
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label>Email</label>
<input type="email" required name="email" placeholder="Email Address"
class="form-control">
</div>
<div class="col-md-6">
<label>Phone</label>
<input type="text" required name="phone" placeholder="Phone Number"
class="form-control">
</div>
</div>
57

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

<div class="row mb-3">


<div class="col-md-6">
<label>Password</label>
<input type="password" required name="password" placeholder="Password"
class="form-control">
</div>
<div class="col-md-6">
<label>Username</label>
<input type="password" required name="password" placeholder="Confirm
Password" class="form-control">
</div>
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary w-100">Submit</button>
</div>
</form>
<a class="text-success" href="/login/">Already User?Login To Your Account</a>
</div>
</div>

{% endblock %}

58

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

View.py

from django.shortcuts import render,HttpResponseRedirect


from django.db.models import Q
from django.contrib.auth.models import User
from django.contrib import auth,messages
from django.contrib.auth.decorators import login_require
from django.conf import settings
from django.core.mail import send_mail
from ecart.settings import RAZORPAY_API_KEY,RAZORPAY_API_SECRET_KEY
import razorpay

from .models import *

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")

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"):

59

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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:
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")
maincategories = Maincategory.objects.all()

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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")

elif(mc=="All" and sc=="All" and br!="All"):


data =
Product.objects.filter(brand=Brand.objects.get(name=br)).order_by("finalprice")
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("finalprice")
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("finalprice")
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("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")
else:
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(brand=Brand.objects.get(name=br)).order_by("-
finalprice")
elif(mc!="All" and sc!="All" and br=="All"):

61

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),subcategory=Subcategory
.objects.get(name=sc)).order_by("-finalprice")

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("-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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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")

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),finalprice__gte=min,finalprice__lte=max).order_by("-id")

elif(mc=="All" and sc!="All" and br!="All"):


else:
data =
Product.objects.filter(maincategory=Maincategory.objects.get(name=mc),brand=Brand.objects.get
(name=br),subcategory=Subcategory.objects.get(name=sc),finalprice__gte=min,finalprice__lte=ma
x).order_by("-id")
maincategories = Maincategory.objects.all()

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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():

if(subtotal>0 and subtotal<1000):

65

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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()

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, ]
send_mail( subject, message, email_from, recipient_list )
return HttpResponseRedirect('/confirmation/')

@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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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")):

messages.error(Request,"Password and Confirm Password Doesn't Matched!!!")


else:
try:
user = User.objects.create(username=Request.POST.get("username"))
user.set_password(Request.POST.get("password"))

69

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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()

subject = 'Your Account Has Been Created : Team E-Cart'


message = """
Hello """+b.name+"""
Thanks to Create an Account with us
Now you can Buy Latest Products
Team : E-Cart
"""
email_from = settings.EMAIL_HOST_USER
recipient_list = [b.email, ]
send_mail( subject, message, email_from, recipient_list )
return HttpResponseRedirect("/login/")
except:
messages.error(Request,"Username Already Taken!!!")
return render(Request,"signup.html")

@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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

main.js

(function ($) {
"use strict";

// Dropdown on mouse hover


$(document).ready(function () {
function toggleNavbarMethod() {
if ($(window).width() > 992) {
$('.navbar .dropdown').on('mouseover', function () {
$('.dropdown-toggle', this).trigger('click');
}).on('mouseout', function () {
$('.dropdown-toggle', this).trigger('click').blur();
});
} else {
$('.navbar .dropdown').off('mouseover').off('mouseout');
}
}
toggleNavbarMethod();
$(window).resize(toggleNavbarMethod);
});

// Back to top button


$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('.back-to-top').fadeIn('slow');
} else {
$('.back-to-top').fadeOut('slow');
}
});
$('.back-to-top').click(function () {
$('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo');
return false;
});

// Vendor carousel
$('.vendor-carousel').owlCarousel({
loop: true,
margin: 29,
nav: false,
autoplay: true,
smartSpeed: 1000,
responsive: {
0:{
items:2
},
73

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

} else {
newVal = 0;
}
}
button.parent().parent().find('input').val(newVal);
});

})(jQuery);

75

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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;
}

h1, h2, h3, h4, h5, h6 {


margin-top: 0;
margin-bottom: 0.5rem;
}

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

font: inherit;
-webkit-appearance: button;
}

output {
display: inline-block;
}

summary {
display: list-item;
cursor: pointer;
}

template {
display: none;
}

[hidden] {
display: none !important;
}

h1, h2, h3, h4, h5, h6,


.h1, .h2, .h3, .h4, .h5, .h6 {
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
color: #3D464D;
}

h1, .h1 {
font-size: 2.5rem;
}

@media (max-width: 1200px) {


h1, .h1 {
font-size: calc(1.375rem + 1.5vw) ;
}
}

h2, .h2 {
font-size: 2rem;
}

@media (max-width: 1200px) {


h2, .h2 {
font-size: calc(1.325rem + 0.9vw) ;
}
}

83

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

h3, .h3 {
font-size: 1.75rem;
}

@media (max-width: 1200px) {


h3, .h3 {
font-size: calc(1.3rem + 0.6vw) ;
}
}

h4, .h4 {
font-size: 1.5rem;
}

@media (max-width: 1200px) {


h4, .h4 {
font-size: calc(1.275rem + 0.3vw) ;
}
}

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;
}

@media (max-width: 1200px) {


.display-1 {
font-size: calc(1.725rem + 5.7vw) ;
}
}

.display-2 {
font-size: 5.5rem;

84

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

font-weight: 300;
line-height: 1.2;
}

@media (max-width: 1200px) {


.display-2 {
font-size: calc(1.675rem + 5.1vw) ;
}
}

.display-3 {
font-size: 4.5rem;
font-weight: 300;
line-height: 1.2;
}

@media (max-width: 1200px) {


.display-3 {
font-size: calc(1.575rem + 3.9vw) ;
}
}

.display-4 {
font-size: 3.5rem;
font-weight: 300;
line-height: 1.2;
}

@media (max-width: 1200px) {


.display-4 {
font-size: calc(1.475rem + 2.7vw) ;
}
}

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

.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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

.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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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;
}

@media (min-width: 576px) {


.container, .container-sm {
max-width: 540px;
}
}

@media (min-width: 768px) {


.container, .container-sm, .container-md {
max-width: 720px;
}
}

@media (min-width: 992px) {


.container, .container-sm, .container-md, .container-lg {
max-width: 960px;
}
}

@media (min-width: 1200px) {


.container, .container-sm, .container-md, .container-lg, .container-xl {
max-width: 1140px;
}

88

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

.row {
display: flex;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}

.no-gutters {
margin-right: 0;
margin-left: 0;
}

.no-gutters > .col,


.no-gutters > [class*="col-"] {
padding-right: 0;
padding-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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

.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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

SCREEN SHOTS

Home Page:-

94

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Latest Products:-

95

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Company Logo:-

96

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Cart Page:-

97

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Contact Page:-

98

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Profile Page:-

99

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Add To Cart Page:-

100

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Login Page:-

101

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

Sign Up Page:-

102

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

SYSTEM SECURITY MEASURES

 Use strong passwords. Strong passwords are vital to good online security

 Control access to data and systems

 Put up a firewall

 Use security software

 Update programs and systems regularly

 Monitor for intrusion

 Raise awareness

103

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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:

analyzing the product requirements for completeness and correctness in various


contexts like industry perspective, business perspective, feasibility and viability of
implementation, usability, performance, security, infrastructure considerations, etc.
reviewing the product architecture and the overall design of the product
working with product developers on improvement in coding techniques, design
patterns, tests that can be written as part of code based on various techniques like
boundary conditions, etc.
executing a program or application with the intent of examining behavior
reviewing the deployment infrastructure and associated scripts and automation
take part in production activities by using monitoring and observability techniques
Software testing can provide objective, independent information about the quality of
software and risk of its failure to users or sponsors.

104

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

SYSTEM TESTING

System Testing includes testing of a fully integrated software system. Generally, a


computer system is made with the integration of software (any software is only a single
element of a computer system). The software is developed in units and then interfaced
with other software and hardware to create a complete computer system. In other
words, a computer system consists of a group of software to perform the various tasks,
but only software cannot perform the task; for that software must be interfaced with
compatible hardware. System testing is a series of different type of tests with the
purpose to exercise and examine the full working of an integrated software computer
system against requirements.
To check the end-to-end flow of an application or the software as a user is known as
System testing. In this, we navigate (go through) all the necessary modules of an
application and check if the end features or the end business works fine, and test the
product as a whole system.
It is end-to-end testing where the testing environment is similar to the production
environment.

106

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

OBJECTIVE OF TESTING

 Functional correctness. Validation that the application correctly supports required


business processes and transactions. ...
 Authorization. Verification that actions and data are available only to those users
with correct authorization. ...
 Service level. ...
 Usability.

107

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

FUTURE SCOPE AND FURTHER ENHANCEMENT OF THE PROJECT

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

Further Enhancement of the Project:-

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

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

CONCLUSION OF THE PROJECT

The project entitled ECOMMERCE WEBSITE was completed successfully.


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

This project helped us in gaining valuable information and practical


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

This project has given us great satisfaction in having designed an


application which can be implemented to any nearby shops or branded
shops selling various kinds of organic products by simple modifications.
There is a scope for further development in our project to a great extend.
A number of features can be added to this system in future like providing
moderator more control over products so that each moderator can
maintain their own products. Another feature we wished to implement was
providing classes for customers so that different offers can be given to
each class. System may keep track of history of purchases of each
customer and provide suggestions based on their history. These features
could have implemented unless the time did not limited us.

109

Downloaded by LOVE GARG ([email protected])


lOMoARcPSD|19292886

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

Downloaded by LOVE GARG ([email protected])

You might also like