0% found this document useful (0 votes)
30 views

Project Report E-Comm

This document describes a proposed e-commerce system called ShoppingX. The existing manual system is inefficient and time-consuming. The proposed system will have admin and user modules, allowing the admin to manage products, orders, and reports, and users to shop, place orders, and manage their profiles.

Uploaded by

7974patills
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Project Report E-Comm

This document describes a proposed e-commerce system called ShoppingX. The existing manual system is inefficient and time-consuming. The proposed system will have admin and user modules, allowing the admin to manage products, orders, and reports, and users to shop, place orders, and manage their profiles.

Uploaded by

7974patills
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

A

Project Report

ON

ShoppingX

Submitted to

Savitribai Phule Pune University

In Partial Fulfillment of

Master of Computer Application (MCA)

Submitted by

Ghadge Karan Sunil

Under the Guidance of

Prof . Prashant Chordiya

Shikshan Maharshi Dr. D.Y.Patil Shikshan Sanstha’s

Dr. D.Y. Patil Centre for Management & Research


Newale Vasti, Pimpri – Chinchwad,
Pune.

A.Y. 2023-24

1
Shikshan Maharshi Dr. D.Y.Patil Shikshan Sanstha’s
Dr. D.Y. Patil Centre for Management &
Research
Newale Vasti, Chikhali, Pune- 412114

CERTIFICATE

This is to certify that the summer internship project titled “ ShoppingX ” an


academic work done by “ Ghadge Karan Sunil ” II Year Student, submitted
in partial fulfilment of the requirement for the award of the degree of Master
of Computer Application (MCA) from Savitribai Phule Pune University,
Pune. This is an original work done by him/her

This work is not submitted earlier in part of full to this or any other institute
/ University for any degree / diploma

Project Guide HOD Director


DYPCMR

Date : -

Place : - Chikhali, Pune

2
ACKNOWLEDGEMENT

I consider it a privilege to express a few words of gratitude and respect to all


who guided and inspired me in successful completion of this project. I
acknowledge my profound indebtedness and extend my deep sense of gratitude
to my Project Guide Prof . Prashant Chordiya for sharing their knowledge and
experience and providing valuable guidance, profound advice and
encouragement that has led to successful completion of this project.

I would like to thank Dr. Sunil Dhanawade , Director DYPCMR, and


Dr. Jayshri Patil , HOD, DYPCMR for their guidance and unflinching support
throughout the phase of my Project Submission.

Ghadge Karan Sunil

3
Company Certificate

4
Declaration by Student

I , Ghadge Karan Sunil the undersigned solemnly declare that the


project report is based on my own work carried out during the course of
“Master in Computer Applications” study under the supervision of
Prof . Prashant Chordiya . I assert the statements made and conclusions drawn
are an outcome of my work. I further certify that

1. The work contained in the report is original and has been done by me under the
general supervision of my supervisor.
2. The work has not been submitted to any other Institution for any other
degree/diploma/certificate in this university or any other University of India or
abroad.
3. I have followed the guidelines provided by the SPPU University while writing
the report.

Ghadge Karan Sunil

5
Index

Sr. No Details Page


No
1 Introduction
1.1 Company Profile / Institute Profile / Client Profile 8
1.2 Introduction of the Project 8
1.3 Existing System 9
1.4 Scope of System 10
1.5 Operating Environment - Hardware and Software 11
1.6 Module Description 12
Brief Description of Technology Used 13
1.7 1.7.1. Operating systems used (Windows or Unix)
1.7.2. Technology Description

2 Proposed System
2.1 Proposed System 16

2.2 Feasibility Study 16


2.3 Objectives of Proposed System 19
2.4 Users of System 19
3 Analysis and Design
3.1 System Requirements (Functional and Non-Functional requirements) 20

3.2 DFD (Admin , User ) 23


3.3 Entity Relationship Diagram (ERD) 28
3.4 Use Case Diagrams 29
3.5 Object Diagram 31
3.6 Class Diagram 32
3.7 Activity Diagram 33
3.8 Data Dictionary 34
3.9 Table Specification 35
3.10 User Interface Design 39
4 Coding
4.1 Sample Code 55

6
5 Testing
5.1 Test Strategy 62
5.2 Unit Test Plan 63
5.3 Acceptance Test Plan 64
5.4 Test Cases 65
6 Limitations of Proposed System 75
7 Proposed Enhancements 76
8 Conclusion 77
9 Bibliography 78

7
CHAPTER - 1
INTRODUCTION

1.1 Client / Organization Profile –

Client Name : C- INFOTECH


Organization Profile –
Location : Katraj, Pune
Organization :
We are the Software Development and Training company founded in 2005, Since then,
we have transformed career of 100s of students and IT professionsl through our short
term and long term training courses

Introduction of the Project –


In this e-commerce system, we will create a web-based application with the help of
some technologies. in this e-commerce website first module will be an admin panel and
the second module will be a customer module. in the admin panel, there is a log-in
procedure first the admin has to Enters the credentials for logging in to the website after
that the administrator can add or remove the product as well administrator can see the
generated orders all details and update the status like(accepted, packed or deliver). After
that admin can also generate the reports in this project. in the customer panel the
customer can firstly login to the system with their credentials if the customer doesn't
have login details then the customer has to register themselves after that the customer
can see the products and add them to the cart after that customer can add the range of
the products and fill the address details and chose the payment method and just pay it
and finally the order will be generated by the customer. After that customer can see the
order details. Customer can edit their profile and change their password also.

8
1.2 Existing System and Need for System –

Existing System :

The current system of the shop is manual system. In existing system manual methods
are used for the purpose of handling customer orders and all the information. In this
system updating orders, bills and status are quite difficult.

All the process of existing system is done manually, we notice that this system isnot
user friendly. So we have developed an e-commerce website for it.

Disadvantages of Existing System:

The existing system is manual so it is difficult to handle the crowd in the shop. It
requires more man power to maintain the customer records. They don’t have proper
billing system and is also a time consuming system and not reliable the data
maintained in the existing system is not efficient also calculations to generate the
report are used to done manually which requires a lot of paper work leads to wastage
of time of customer and owner as well.

9
1.3 Scope of System –

Admin Module :
This module will deal with the administrator functionalities. It will help the admin to
add or remove the product and modify the product details as well as generate the report.
It will also help the admin to see the user details and make the status of the product as
active or de-active and maintain the stock of a product.

Customer Module :
This module will provide a username and a password after registering to the system
through which customer can login to the system to proceed further. Customer can place
order, add item to cart and manage their profile. Customer can add multiple addresses
and change their password.

10
1.4 Operating Environment - Hardware and Software

Hardware Requirements :

⚫ Operating System : Windows 8/8.1/10 (64-bit)

⚫ CPU : 2nd generation Intel CPU or newer

⚫ Memory : 4 GB or more

⚫ Free storage : 8 GB

Software Requirements :

⚫ Frontend : HTML-5, CSS-3, JavaScript, JQuery, Ajax, Bootstrap-5.2

⚫ Backend : Python, Django

11
1.5 Module Description –

1. User Module
• Register
• Login
• User profile / Home Page
• Place Order
• Product filters
• Add Item Cart
• Manage their profile
• Product filters
• Payment
• User dashboard

2. Admin Module
• login
• admin dashboard
• create product
• order status
• Add /update /delete product
• Maintain user details

12
1.6 Brief Description of Technology Used
HTML-5 :
HTML (HyperText Markup Language) is the foundational markup language used in
front-end web development to structure and present content on the web. Created by Tim
Berners-Lee in 1991, HTML has evolved through several versions, with HTML 2.0 in
1995 marking its first standard. The language saw significant enhancements with
HTML 4.01 in 1999 and later with HTML5, introduced in 2012, which brought
advanced capabilities for handling multimedia and graphical content without needing
additional plugins. HTML documents form the backbone of user interfaces, enhancing
the visual experience by determining how content is displayed by browsers.
● HTML is very easy to learn and implement.
● It is platform independent.
● It is an open-source program that can be used free of cost.
● HTML needs simple editor and a browser to implement. \

CSS 3:
Cascading Style Sheets (CSS) is a style sheet language essential for describing the
visual presentation of documents created in markup languages like HTML. Proposed
by Håkon Wium Lie on October 10, 1994, and officially released on December 17,
1996, CSS has become a cornerstone of web design, standardized by the W3C to ensure
consistency across different web browsers. CSS allows developers to apply styles
universally across multiple pages, enhancing aspects of web page layout such as text
styles, table cell padding, and border properties. This provides web developers precise
control over the appearance of web pages, far beyond what HTML alone can offer.

JavaScript ES2015 :
JavaScript (JS) is a versatile, lightweight, and interpreted scripting language known primarily
for enhancing web pages but also used in various non-browser environments. It supports object-
oriented, imperative, and functional programming styles, operating mainly on the client side to
dictate web page behaviors in response to user events. Defined by the ECMA-262 Specification,
JavaScript's dynamic and prototype-based nature makes it both powerful and relatively easy to
learn, making it a popular choice for web development. It plays a crucial role in the interactive
and dynamic aspects of websites, greatly extending the capabilities of HTML and CSS.

13
● JavaScript is a lightweight, interpreted programming language.
● Designed for creating network-centric applications.
● Complementary to and integrated with Java.
● Complementary to and integrated with HTML.
● Open and cross-platform

JQuery:
jQuery is a popular open-source JavaScript library designed to simplify the
manipulation of the HTML Document Object Model (DOM), handling of events, and
execution of Asynchronous JavaScript and XML (Ajax) in web applications. It allows
developers to easily find and manipulate DOM elements, modify attributes, and manage
event responses without reloading the web page. Additionally, jQuery enhances user
interfaces by enabling dynamic content changes and incorporating visual effects like
fade-ins and outs using CSS manipulations. Supported by a robust community, jQuery
also offers a wealth of plugins that extend its functionality, making it a valuable tool
for efficient and effective web development.
Features:
Features provided by jQuery include:
• A light footprint around 30 kB.
• Supports Chrome, Firefox, Safari, Internet Explorer and Edge.
• Event handling
• Ajax support
• Plug-in support
• DOM element manipulation based on CSS selectors.
• JSON parsing
• Feature detection
• Animation effects
JQuery plugins
• JQuery supports plug-ins which provide additional functionality to jQuery. Plug-ins
are added on top of JavaScript libraries. They can be used to extend a prototype element,
which enables jQuery to use added features.

14
Django : Django is a high-level Python web framework known for its efficiency in
developing secure and maintainable websites. Here are some key points that highlight
its capabilities and advantages:

1. Rapid Development : Django's "Batteries included" philosophy means it comes with


built-in features for almost everything developers might need, allowing for quick and
cohesive application development.

2. Versatility : Suitable for building a variety of websites, from social networks to news
sites, Django works well with any client-side framework and supports multiple data
formats including HTML, RSS, JSON, and XML.

3. Security : Django helps prevent common security issues such as SQL injection and
cross-site scripting. It offers a secure way to manage user accounts and passwords,
using techniques like storing password hashes instead of actual passwords.

4. Scalability : Utilizing a "shared-nothing" architecture, each component of Django is


independent and replaceable, allowing for scaling by adding hardware at various levels,
such as caching servers or database servers.

5. Maintainability : Django encourages writing reusable and maintainable code by


adhering to the DRY (Don't Repeat Yourself) principle, minimizing code redundancy
and promoting the grouping of functionality into reusable "applications."

6. Portability : Written in Python, Django is portable across many operating systems


including Linux, Windows, and macOS, making it a flexible choice for a wide range of
development environments.
7. Community and Support : Django is supported by a thriving and active community,
with abundant documentation and a variety of options for both free and paid support,
enhancing its reliability and ease of use.

15
CHAPTER - 2
PROPOSED SYSTEM

This E-commerce system is designed for providing easier way to order garments as well
as manage the orders from both customer and admin side. Our application is very simple
and user friendly, one can easily search for his/her needs on a touch and it’s very easy
to code and edit.
✓ The admin can add, remove and modify the product and can maintain
the stock online. The admin can generate the report and export the
generated report in the form of pdf.
✓ The user can register and login into the system.
✓ Customer can add the product to the cart and add the delivery
address and make payment.

2.2 Feasibility Study –

As the name implies, a feasibility analysis is used to determine the viability of an idea,
such as ensuring a project is legally and technically as well as economically justifiable.
It tells us whether a project is worth the investment in some cases, a project may not be
doable. There can be many reasons for this, including requiring too many resources,
which not only prevents those resources from performing other tasks but also may cost
more than an organization would earn back by taking on a project that isn’t profitable.
A well-designed study should offer a historical background of the business or project,
such as a description of the product or service, accounting statements, details of
operations and management, marketing research and policies, financial data, legal
requirements, and tax obligations. Generally, such studies precede technical
development and project implementation Types of Feasibility Study.

2.2.1 Technical Feasibility:


This assessment focuses on the technical resources available to the organization. It
helps organizations determine whether the technical resources meet capacity and
whether the technical team is capable of converting the ideas into working systems.
Technical feasibility also involves the evaluation of the hardware, software, and other
16
technical requirements of the proposed system. As an exaggerated example, an
organization wouldn’t want to try to put Star Trek’s transporters in their building
currently, this project is not technically feasible.
● Making this web application of E-commerce system needs some
technical requirements.
● For this web application some configured machine is required.
● The system requires the new updated software, fast bootable machines, and
the response type of machine is very important.
● CPU speed is a matter of time.
● We need to find this web application that is technically supported on all
devices.
● Input and output will be correct.
● No glitches.

2.2.2 Operational Feasibility:


This assessment involves undertaking a study to analyse and determine whether and
how well the organization’s needs can be met by completing the project. Operational
feasibility studies also examine how a project plan satisfies the requirements identified
in the requirements analysis phase of system development.
● For making this web application the updated software are required.
● The setup of software is properly installed.
● The data requirement and analysis will be a perfect outcome.
● All new tools and front end and backend technologies are time to time
updates.

2.2.3 Economic Feasibility:


Economic feasibility determines whether the required software is capable of generating
financial gains for an organization. It involves the cost incurred on the application
development team, estimated cost of hardware and software, cost of performing
feasibility studies, and so on. For this, it is essential to consider expenses for software
development. In addition, It is necessary to consider the benefits that can be achieved
by developing the software.
● When we will be deploying this web application the economic output will
be profitable.
17
● The requirements of software and tools are economically profitable.
● Web applications are economically perfect for users.
● The income sources are available after deployment.

2.2.4 Schedule Feasibility:


The process of assessing the degree to which the potential time frame and completion
dates for all major activities within a project meet organizational deadlines and
constraints for affecting change. In this analysis we analysed the project and estimated
the time for the whole project.
● The given work will be done before the deadline.
● The fix schedule will be followed by all users and administrators.
● The working is in the proper direction and in flow.
● The schedule will manage all the outcomes.

2.2.5 Legal Feasibility:


This assessment investigates whether any aspect of the proposed project conflicts with
legal requirements like zoning laws, data protection acts or social media laws. Let's say
an organization wants to construct a new office building in a specific location. A
feasibility study might reveal the organization's ideal location is not zoned for those
types of business. The organization has just saved considerable time and efforts by
learning that their project was not feasible right from the beginning.
● The project wants legal data for upload.
● The data rights are also taken over by the founders.
● All legal changes are rights given only to developers and founders.
● Data verification is necessary before uploading to a web application.
● No third party can interfere between data updating and deleting.

18
2.3 Objectives of Proposed System –

• To provide an E-commerce system to sell the products.


• To provide a system where admin can generate the automatic bill.
• To provide a system where admin can generate the report of generated order.
• To provide a system where admin can manage the stock.

2.4 Users of System –

This application will be made up for online shopping. In this application the users
perform different tasks from different sides. The user of the system is given below.
1. Admin
2. Customer
Admin:
This module will deal with the administrator functionalities. It will help the
admin to add or remove the product and modify the product details as well
as generate the report. It will also help the admin to see the user details and
make the status of the product as active or de-active and maintain the stock
of a product.
Customer:
This module will provide a username and a password after registering to the system
through which customer can login to the system to proceed further. Customer can place
order, add item to cart and manage their profile. Customer can add multiple addresses
and change their password.

19
CHAPTER - 3
ANALYSIS AND DESIGN

3.1 System Requirements (Functional and Non-Functional


requirements)

Functional Requirements :
Functional requirements are responsible for the behavior of your website and can vary
as per the needs and business industry niche. For e.g. the mobile e-commerce stores lets
the customers choose different item attributes such as color, storage, processor, etc.; on
the other side the travel companies may require a Chabot for providing user assistance,
goods brands come with a zoom option on the product detail page. Here are the other
important functional requirements that you must consider for your e-commerce store.

Registration
Input: Username, Email, Password, Confirm Password

Output: Registered Successfully.

Work Flow: Validate the given details and redirect to the login page.
Login
Input: username, password
Output: Logged in Successfully.
Work Flow: Validate the given details and redirect to the dashboard.

Add Address
Input: Name, Locality, City, State, pin-code.
Output: Pop up with a message “Profile Updated Successfully”.
Workflow: Validate the given details and add the address to the user profile.

Add to cart
Input: Select Item, Select Quantity.
Output: Pop up with a message “Product added to cart successfully”.
Workflow: Add product to the cart of the respective user.

20
Add Product
Input: Title, Description, image, selling price, discount price, brand, category.
Output: Product Added Successfully.
Workflow: Add product to the database.

View User
Input: login to the system.
Output: Display all the users of the system.
Workflow: Validate the given details and display the records from the database.

Report
Input: Select date.
Output: Shows Order details till selected date.
Workflow: Validate the given details and display report.

Non - Functional Requirements


As mentioned earlier, non-functional requirements articulate the quality attributes of
the website that build positive user experience and optimal website performance. There
are many other types of NFRs, all of which can have a critical impact on the
performance, scalability, and usability of your e-commerce platform. These include.

Security
There are several user levels in E-commerce System. it is important to specify the level of
security that should be met such as the OWASP top 10. Access to the various
subsystems will be protected by a customer login screen that requires a username and
a password. Each user is assigned with a unique username and password. The system
will authenticate the user each time they log in.

Reliability
System will prompt the user if any incorrect input is being made. User can easily work
with different events and buttons.

Privacy
Meeting basic requirements for GDPR.

21
Scalability and performance
Ensuring that the system can scale to meet expected traffic and order volume at
normal and peak times.

Speed of web services


Defining how long web services will take to provide a response.

Accessibility
Ensuring that the platform meets the basic accessibility standards throughout.

Documentation
Ensuring that the platform is sufficiently documented.

User Friendly
System is very easy to use and understand. There is no such requirements for using the
system any common user can use the system. The GUI is attractive and can be easily
understood by any common user.

22
3.2 Context level DFD – 0 level

23
3.2.1 1st Level Admin Side DFD

24
3.2.2 1st Level User Side DFD

25
3.2.3 2nd level – User side DFD (4.0)

26
3.2.4 2nd level – User side DFD (5.0)

27
3.3 Entity Relationship Diagram (ERD)

28
3.4 Use Case Diagrams
Actor Use Case Diagram

29
Global Use Case Diagram

30
3.5 Object Diagram

31
3.6 Class Diagram

32
3.7 Activity Diagram

33
3.8 Data Dictionary

Name Data Type Description


Brand Varchar The brand name of the product

Category Varchar The category of the product

City Varchar City name of user

Customer Varchar The customer table use as the Foreign key


Description Varchar The description of the product

Discount price Integer The discount price of the product

First Name Varchar First name of user


Locality Varchar Locality of user

Name Varchar Users name

Order date date The order date of the product

password Varchar Password of user

Product Varchar The product table use as the Foreign key


Product image Image The image of the product

Quantity Integer The quantity of the product


Selling price Integer Price of the product

State Varchar User state name

Status Varchar The order status of the product


Title Varchar Title of product

User Varchar The user table use as a foreign key

Username Varchar Username of user


pin code Integer User address pin code

34
3.9 Table Specification

Abbreviations :
Sr. No. Abbreviation Description
1 PK Primary key
2 FK Foreign key
3 AI Auto Increment
4 NN Not Null
5 AN Allow Null

The Database contains following tables :


USER :
Table Name User
Description This table contains all the details about Login Registration.
Primary Key

Field Name Data Type Size Constraints Description


Username Varchar 30 PK Username of user
password Varchar 12 NN Password of user
First Name Varchar 15 NN First name of user

CUSTOMER :

Table customer
Name

Description This table contains all the details about


Customer.

Primary
Key

35
Field Data Size Constraints Description
Name Type

User Varchar - FK The user


table use as
a foreign
key

Name Varchar 20 NN Users name


Locality Varchar 20 NN Locality of
user

City Varchar 20 NN City name


of user

pin Integer 6 NN User


code address pin
code

State Varchar 20 NN User state


name

PRODUCT :

Table Name product


Description This table contains all the details about product
Primary Key

Field Name Data Type Size Constrains Description


Title Varchar 10 NN Title of product
Selling price Integer 5 NN Price of the product
Discount Integer 5 NN The discount price of the
price product

36
Description Varchar 500 AL The description of the product
Brand Varchar 15 AL The brand name of the
product
Category Varchar 20 AL The category of the product
Product Image - NN The image of the product
image

ORDER PLACED :

Table Order placed


Name

Description This table contains all the details about


placed order

Primary
Key

Field Name Data Type Size Constrains Description

User Varchar - FK The user table use as the


Foreign key
Customer Varchar - FK The customer table use as the
Foreign key
Product Varchar - FK The product table use as the
Foreign key
Quantity Integer 2 NN The quantity of the product
Order date date - NN The order date of the product
Status Varchar 10 AL The order status of the
product

37
CART :

Table Name cart

Description This table contains all the details about cart


Primary Key

Field Name Data Type Size Constrains Description


User Varchar - FK The user table use as a
Foreign key
Product Varchar - FK Product table use as a Foreign
key
Quantity Integer 2 NN The quantity attribute of
order placed table

38
3.10 User Interface Design

Home Page
Home page of the website.

39
Customer Registration
Customer Registration page.

Username Validation
Registration field validation.

40
Password Validation
Password validation for customer registration.

Registration Successful
Customer registered successfully.

41
Customer Login Page
Login page for customer.

Customer Login
Customer login process.

42
Customer Profile
Customer profile after logging into the system.

Add Address
Add Address page for customer.

43
Address Added Successfully
Customer’s address added successfully.

View Address
After successful addition customer can see the address here.

44
View Product
Customer can see the full product description after clicking on it.

Add to Cart
Customer added product to the cart successfully.

45
Product Added Successfully
Pop up message for product added to cart successfully.

View Shopping Cart


Customer can see the added product in the shopping cart .

46
Order Summary
Order summary after clicking place order.

Admin Login
Admin login page.

47
Admin Dashboard
Admin dashboard after admin login.

View Cart Details


Admin can see the cart details here.

48
Delete Selected Cart Item
Admin can perform action on selected cart item.

Deleted Successfully
Pop up message “Successfully deleted 1 cart”.

49
View Customer Details
Here admin can see the customer details.

Customer Record Deletion


Admin can delete the customer records here.

50
Confirmation Before Deletion
Confirmation page before record deletion.

Customer Deleted Successfully


Pop up message “Successfully deleted 9 customers”.

51
View Products
Admin can see the products added to the system.

Select Product to Delete


Admin can select the product to be deleted.

52
Product Deleted Successfully
Pop up message “Successfully deleted 1 product”.

Add Product
Admin can add the product here by filling the product details.

53
Product Added Successfully
Pop up message “The product 25 was added successfully”.

54
CHAPTER - 4
CODING

Sample Code
manage.py
#!/usr/bin/env python

"""Django's command-line utility for administrative tasks."""

import os

import sy

def main():

"""Run administrative tasks."""

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shoppinglyx.settings')

try:

from django.core.management import execute_from_command_line

except ImportError as exc:

raise ImportError(

"Couldn't import Django. Are you sure it's installed and "

"available on your PYTHONPATH environment variable? Did you "

"forget to activate a virtual environment?"

) from exc

execute_from_command_line(sys.argv)

if __name__ == '__main__':

main()

models.py
from django.db import models
from django.contrib.auth.models import User
from django.core.validators import MaxValueValidator, MinValueValidator
STATE_CHOICES = (
('Andaman & Nicobar Islands','Andaman & Nicobar Islands'),
55
('Andhra Pradesh','Andhra Pradesh'),
('Arunachal Pradesh','Arunachal Pradesh'),
('Assam','Assam'),

('Bihar','Bihar'),
('Chandigarh','Chandigarh'),
('Chhattisgarh','Chhattisgarh'),
('Dadra & Nagar Haveli','Dadra & Nagar Haveli'),
('Daman and Diu','Daman and Diu'),
('Delhi','Delhi'),
('Goa','Goa'),
('Gujarat','Gujarat'),
('Haryana','Haryana'),
('Himachal Pradesh','Himachal Pradesh'),
('Jammu & Kashmir','Jammu & Kashmir'),
('Jharkhand','Jharkhand'),
('Karnataka','Karnataka'),
('Kerala','Kerala'),
('Lakshadweep','Lakshadweep'),
('Madhya Pradesh','Madhya Pradesh'),
('Maharashtra','Maharashtra'),
('Manipur','Manipur'),
('Meghalaya','Meghalaya'),
('Mizoram','Mizoram'),
('Nagaland','Nagaland'),
('Odisha','Odisha'),
('Puducherry','Puducherry'),
('Punjab','Punjab'),
('Rajasthan','Rajasthan'),
('Sikkim','Sikkim'),
('Tamil Nadu','Tamil Nadu'),
('Telangana','Telangana'),
('Tripura','Tripura'),
('Uttarakhand','Uttarakhand'),
('Uttar Pradesh','Uttar Pradesh'),

56
('West Bengal','West Bengal'),
)

class Customer(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
name = models.CharField(max_length=200)
locality = models.CharField(max_length=200)
city = models.CharField(max_length=50)
zipcode = models.IntegerField()
state = models.CharField(choices=STATE_CHOICES, max_length=50)

def __str__(self):
# return self.user.username
return str(self.id)
CATEGORY_CHOICES = (
('M', 'Saree'),
('L', 'Lehenga'),
('TW', 'Top Wear'),
('BW', 'Bottom Wear'),
)
class Product(models.Model):
title = models.CharField(max_length=100)
selling_price = models.FloatField()
discounted_price = models.FloatField()
description = models.TextField()
brand = models.CharField(max_length=100)
category = models.CharField( choices=CATEGORY_CHOICES, max_length=2)
product_image = models.ImageField(upload_to='productimg')

def __str__(self):

57
return str(self.id)

class Cart(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
product = models.ForeignKey(Product, on_delete=models.CASCADE)
quantity = models.PositiveIntegerField(default=1)

def __str__(self):
return str(self.id)

# Below Property will be used by checkout.html page to show total cost in order summary
@property
def total_cost(self):
return self.quantity * self.product.discounted_price

STATUS_CHOICES = (
('Accepted','Accepted'),
('Packed','Packed'),
('On The Way','On The Way'),
('Delivered','Delivered'),
('Cancel','Cancel')
)

class OrderPlaced(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
product = models.ForeignKey(Product, on_delete=models.CASCADE)
quantity = models.PositiveIntegerField(default=1)
ordered_date = models.DateTimeField(auto_now_add=True)
status = models.CharField(max_length=50,choices=STATUS_CHOICES,default='Pending')

# Below Property will be used by orders.html page to show total cost


@property
def total_cost(self):

58
return self.quantity * self.product.discounted_price

admin.py
from django.contrib import admin
from django.utils.html import format_html
from django.urls import reverse
from .models import (
Customer,
Product,
Cart,
OrderPlaced
)

@admin.register(Customer)
class CustomerModelAdmin(admin.ModelAdmin):
list_display = ['id', 'user', 'name', 'locality', 'city', 'pincode', 'state']

@admin.register(Product)
class ProductModelAdmin(admin.ModelAdmin):
list_display = ['id', 'title', 'selling_price', 'discounted_price', 'description', 'brand', 'category',
'product_image']

@admin.register(Cart)
class CartModelAdmin(admin.ModelAdmin):
list_display = ['id', 'user', 'product', 'quantity']

@admin.register(OrderPlaced)
class OrderPlacedModelAdmin(admin.ModelAdmin):
list_display = ['id', 'user', 'customer', 'customer_info', 'product', 'product_info', 'quantity',
'ordered_date', 'status']

def product_info(self, obj):


link = reverse("admin:app_product_change", args=[obj.product.pk])
return format_html('<a href="{}">{}</a>', link, obj.product.title)

59
def customer_info(self, obj):
link = reverse("admin:app_customer_change", args=[obj.customer.pk])
return format_html('<a href="{}">{}</a>', link, obj.customer.name)

customerregistration.html
{% extends 'app/base.html' %}
{% load static %}
{% block title %}Customer Registration{% endblock title %}
{% block main-content %}
<div class="container">
<div class="row my-3">
<div class="col-sm-6 offset-sm-3">

<h3>Customer Registration</h3>
<hr>

<form action="" method="post" novalidate class="shadow p-5">


{% if messages %}
{% for message in messages %}
<p {% if message.tags %} class="alert alert-{{message.tags}} mb-5" {% endif
%}>{{message}}}</p>
{% endfor %}
{% endif %}
{% csrf_token %}
{% for fm in form %}
<div class="form-group mb-3">
{{fm.label_tag}} {{fm}} <small class="text-danger">{{fm.errors|striptags}}</small>
</div>
{% endfor %}
<input type="submit" value="Submit" class="btn btn-primary">
<br>
<div class="text-center text-primary fw-bold"><small>Existing User ? <a href="{% url 'login'
%}" class="text-danger">Login Now</a> </small></div>

60
{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<p class="alert alert-danger my-3">{{error}}</p>
{% endfor %}
{% endif %}
</form>
</div>
</div>
</div>
{% endblock main-content %}

61
CHAPTER - 5
TESTING

5.1 Test Strategy

Test Strategy is the piece of information to be followed to achieve test objective and the process of
test types given in the testing plan.
Following are the testing types that will done in this project:
1) Unit Testing:
For each component of the system testing will be performed individually
software developers and sometimes QA staff during development phase.
2) Integration Testing:
Once Unit Testing is finished, now the components will be combined and tested in
integration testing.
3) Load Testing:
To see how the system will work while multiple users are accessing it
simultaneously, load testing will be performed on system to ensure the stability and
smooth functioning of this application.
4) Security Testing:
Here, Software Testing is performed to ensure the security of the system and to
ensure only the authenticate member can have access of the data.
5) Acceptance testing:
Acceptance Testing will be performed in through this system to ensure all the user
requirement are fulfilled.

62
5.2 Unit Test Plan

Unit testing includes the testing of each unit or an individual component of the software application
in project. It is the almost the first level of functional testing. The main aim behind unit testing is
to validate every component if it's working along with its performance. A unit is individual testable
part of a software system and this testing is done during the development phase of the application
software. The main motive behind of unit testing is to test the correctness of isolated code.
A unit test contains of three stages: plan, cases and scripting
1) Unit test plan:

The Unit Test Plan is a document contains such information as Module, Module Overview,
Module Inputs, etc. in this project testing-library is used for testing each component.

2) Unit test cases:


In this phase, with the help of @testing-library the overall project flow was prepared
along with the different test cases to check if the how the system behaves.

3) Unit test scripting:


In this phase, we have to write a script and then it will run the test whenever the
component loads and create a snapshot of the test result using the library @testing-
library.

63
5.3 Acceptance Test Plan

Acceptance testing is a technique performed to determine whether or not the system has met the
requirements. It is performed by the customer or end-user. It is typically the final stage of software
evaluation, and only conducted once the development team has finished removing any bugs or
errors. It acts as 'go' or 'no go" from customers stopping any substandard software from being
launched. By involving end-users in the acceptance test process, the development team can gather
feedback on how well the software lives up to market standards.
Attributes of Acceptances testing are as follows:
1) Introduction:
This project has been built and tested by considering the client requirements and
each component is been tested individually and the system is built for specific client
requirement.
2) Operation Environment:
The operational environment needed for building, running and testing this project is
minimum. The testing is also done in such a manner that the tests perform on every is
under minimum requirement.
3) Test Procedure:
Testing Procedure for the system is simple, here every field is check if it has value
filled in it, and field like name, email are checked against regular expression for data to
be accurate. Different alert, errors or success messages are shown whenever required
and try and catch blocks are used to for specifics errors.
4) Test Schedule:
The tests are scheduled whenever the user triggers the components and it generates
correct form needed in that screen and the data is either placed for submission

64
5.4 TEST CASES
A test case summary of an ShoppinX system could include the following information in a table
format:

Module Name: Customer Registration


Sub Module Name: Registration Page

Test Case Test Case Description Expected Actual Result Status


With Id Result
User The user have left A pop up A pop up Fail
Name the placeholder empty. message with message with
(Reg 1) “Fill the first “Fill the first
name” should name”
blink. should blink.
User The user have entered Cursor should Cursor should Pass
Name the user name. go the go the
(Reg 1) adjacent row adjacent row
placeholder. placeholder.
Email The user have left A pop up A pop up Fail
(Reg 2) the placeholder empty. message with message with
“Fill the last “Fill the last
name” should name”
blink. should blink.
Email The user have entered Cursor should Cursor should Pass
(Reg 2) the email. go the go the
adjacent row adjacent row
placeholder. placeholder.
Password Given a weak password A pop up A pop up Fail
(Reg 3) . message with message with
“Enter string “Enter string
password” password”
should blink. should blink.
Password Given a strong Valid Valid Pass
(Reg 3) password .
Confirm Given a different A pop up A pop up Fail
Password password. message with message with
(Reg 4) “The two “The two
password field password
didn’t match” field didn’t
should blink. match”
should blink.
Confirm Given same password . Valid Valid Pass
Password
(Reg 4)

65
Module Name: Login
Sub Module Name: Customer Login

Test Case Test Case Description Expected Actual Result Status


With Id Result
Username Given the same Valid Valid Pass
(Log1) Username as given
during the time of
Registration.
Username Not given the same Invalid Invalid Fail
Username as given
(Log1)
during the time of
Registration.

Password Given the password Valid Valid Pass


(Log2) corresponding to the
Username.
Password Not Given the same Invalid Invalid Fail
(Log2) password
corresponding to the
Username.

Module Name: Customer Profile

Sub Module Name: Add Customer Address

Test Case Test Case Description Expected Actual Result Status


With Id Result
Name The user have left A pop up A pop up Fail
(Addr 1) the placeholder empty.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
Name The user have entered Cursor should Cursor should Pass
(Addr 1)
the name. go the adjacent go the

66
row adjacent row
placeholder. placeholder.
Locality The user have left A pop up A pop up Fail
(Addr 2) the placeholder empty.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
Locality The user have entered Cursor should Cursor should Pass
(Addr 2)
the locality. go the adjacent go the
row adjacent row
placeholder. placeholder.
City The user have left A pop up A pop up Fail
(Addr 3) the placeholder empty.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
City The user have entered Cursor should Cursor should Pass
(Addr 3)
the city. go the adjacent go the
row adjacent row
placeholder. placeholder.
State The user have left A pop up A pop up Fail
(Addr 4) the field unselected.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
State The user have selected Cursor should Cursor should Pass
(Addr 4)
the state. go the adjacent go the
row adjacent row
placeholder. placeholder.
Pin code The user have left A pop up A pop up Fail
(Addr 5) the placeholder empty.
message with message with

67
“This Field is “This Field is
Required” Required”
should blink. should blink.
Pin code The user have entered Cursor should Cursor should Pass
(Addr 5)
the pincode. go the adjacent go the
row adjacent row
placeholder. placeholder.

Module Name: Admin

Sub Module Name: Admin Login

Test Case Test Case Description Expected Actual Result Status


With Id Result
Username Given the same Valid Valid Pass
(AdLog1) Username as provided
to the admin.
Username Not given the same Invalid Invalid Fail
(AdLog1) Username as provided
to the admin.
Password Given the password Valid Valid Pass
(AdLog2)
corresponding to the
Username.
Password Not Given the same Invalid Invalid Fail
(AdLog2)
password
corresponding to the
Username.

68
Module Name: Admin

Sub Module Name: Add Product

Test Case Test Case Description Expected Actual Result Status


With Id Result
Title The admin have left A pop up A pop up Fail
(Ad_Pr 1) the placeholder empty.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
Title The admin have Cursor should Cursor should Pass
(Ad_Pr 1)
entered the title. go the go the
adjacent row adjacent row
placeholder. placeholder.
Selling The admin have left A pop up A pop up Fail
Price the placeholder empty.
message with message with
(Ad_Pr 2)
“This Field is “This Field is
Required” Required”
should blink. should blink.

Selling The admin have Cursor should Cursor should Pass


Price entered the selling
go the go the
(Ad_Pr 2) price.
adjacent row adjacent row
placeholder. placeholder.
Discounted The admin have left A pop up A pop up Fail
Price the placeholder empty.
message with message with
(Ad_Pr 3)
“This Field is “This Field is
Required” Required”
should blink. should blink.

Discounted The admin have Cursor should Cursor should Pass


Price
entered the discounted go the go the
(Ad_Pr 3)
price.

69
adjacent row adjacent row
placeholder. placeholder.
Description The admin have left A pop up A pop up Fail
(Ad_Pr 4) the placeholder empty.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.

Description The admin have Cursor should Cursor should Pass


(Ad_Pr 4) entered the go the go the
description. adjacent row adjacent row
placeholder. placeholder.
Brand The admin have left A pop up A pop up Fail
(Ad_Pr 5) the placeholder empty.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
Brand The admin have Cursor should Cursor should Pass
(Ad_Pr 5)
entered the brand. go the go the
adjacent row adjacent row
placeholder. placeholder.
Category The admin have left A pop up A pop up Fail
(Ad_Pr 6) the field unselected.
message with message with
“This Field is “This Field is
Required” Required”
should blink. should blink.
Category The admin have Cursor should Cursor should Pass
(Ad_Pr 6)
selected the category. go the go the
adjacent row adjacent row
placeholder. placeholder.
Image The admin have left A pop up A pop up Fail
(Ad_Pr 7) the field empty.
message with message with

70
“This Field is “This Field is
Required” Required”
should blink. should blink.
Image The admin have Cursor should Cursor should Pass
(Ad_Pr 7)
selected the image. go the go the
adjacent row adjacent row
placeholder. placeholder.

Module Name: Admin

Sub Module Name: Cart Update

Test Case Test Case Description Expected Actual Result Status


With Id Result
Action The admin have left A pop up A pop up Fail
(Cart 1) the field unselected.
message with message with
“No Action “No Action
Selected” Selected”
should blink. should blink.
Action The admin have Cursor should Cursor should Pass
(Cart 1)
selected the action. go the go the
adjacent row adjacent row
placeholder. placeholder.
Item The admin have left A pop up A pop up Fail
(Cart 2) the field unselected.
message with message with
“No Item “No Item
Selected” Selected”
should blink. should blink.
Item The admin have Cursor should Cursor should Pass
(Cart 2)
selected the item. go the go the
adjacent row adjacent row
placeholder. placeholder.

71
Module Name: Admin

Sub Module Name: Customer Update

Test Case Test Case Description Expected Actual Result Status


With Id Result
Action The admin have left A pop up A pop up Fail
(Cust 1) the field unselected.
message with message with
“No Action “No Action
Selected” Selected”
should blink. should blink.
Action The admin have Cursor should Cursor should Pass
(Cust 1)
selected the action. go the go the
adjacent row adjacent row
placeholder. placeholder.
Customer The admin have left A pop up A pop up Fail
(Cust 2) the field unselected.
message with message with
“Customer Not “Customer
Selected” Not Selected”
should blink. should blink.
Customer The admin have Cursor should Cursor should Pass
(Cust 2)
selected the item. go the go the
adjacent row adjacent row
placeholder. placeholder.

72
Module Name: Admin

Sub Module Name: Update Placed Orders

Test Case Test Case Description Expected Actual Result Status


With Id Result
Action The admin have left A pop up A pop up Fail
(Order 1) the field unselected.
message with message with
“No Action “No Action
Selected” Selected”
should blink. should blink.
Action The admin have Cursor should Cursor should Pass
(Order 1)
selected the action. go the go the
adjacent row adjacent row
placeholder. placeholder.
Order The admin have left A pop up A pop up Fail
(Order 2) the field unselected.
message with message with
“No Order “No Order
Selected” Selected”
should blink. should blink.
Order The admin have Cursor should Cursor should Pass
(Order 2)
selected the order. go the go the
adjacent row adjacent row
placeholder. placeholder.

73
Module Name: Admin

Sub Module Name: Product Update

Test Case Test Case Description Expected Actual Result Status


With Id Result
Action The admin have left A pop up A pop up Fail
(P_Upd 1) the field unselected.
message with message with
“No Action “No Action
Selected” Selected”
should blink. should blink.
Action The admin have Cursor should Cursor should Pass
(P_Upd 1)
selected the action. go the go the
adjacent row adjacent row
placeholder. placeholder.
Product The admin have left A pop up A pop up Fail
(P_Upd 2) the field unselected.
message with message with
“No Product “No Product
Selected” Selected”
should blink. should blink.
Product The admin have Cursor should Cursor should Pass
(P_Upd 2)
selected the product. go the go the
adjacent row adjacent row
placeholder. placeholder.

74
CHAPTER-6
LIMITATIONS OF PROPOSED SYSTEM

• Admin have to update product detail which take some time to update on user site.
• Payment option is not provided.
• Cash on delivery is not available is here.
• The website and UI might be more user friendly.
• It required the stable internet connection.

75
CHAPTER - 7
PROPOSED ENHANCEMENTS

• Provide more payment methods including COD (cash on Delivery) and other options.
• Create more user-friendly UI for better interaction.
• Provide more security to user.
• Advance search and filtering options.
• Integration with Social media.
• Enhanced customer support.
• Personalized product recommendations.

76
CHAPTER - 8
CONCLUSION

E-commerce is transforming business operations and consumer shopping habits by offering


advantages like convenience, a broad selection of products, and global reach. To fully leverage
these benefits, it is crucial to address the inherent challenges of e-commerce, including
enhancing sensory product experiences online, implementing robust security measures,
developing resilient technological infrastructures, and improving logistics and customer service.
My project focuses on redefining business processes to overcome these limitations, aiming to
provide an exceptional online shopping experience and build a loyal customer base by ensuring
efficient delivery networks, transparent policies, and responsive customer support systems.

77
CHAPTER-9
BIBLIOGRAPHY

• W3Schools Online Web Tutorials.


• Django Tutorial (tutorialspoint.com).
Books :
• Beginning Python using python 2.6 and python 3.1: By James Payne to guide the basic
python.
• Python programming a modular approach with graphics, Database, Mobile, and web
Application: Sheetal Taneja and Naveen Kumar.
• UML A Beginner’s Guide: Jason T. Roof 3rd Edition.
• HTML 5 Foundations: By Matt West 3rd Edition 2013.

78

You might also like