Valla Final Report
Valla Final Report
INTRODUCTION
1.1 OVERVIEW
1
1.2 BACKGROUND OF THE STUDY
E-commerce is fast gaining ground as an accepted and used business paradigm. More
and more business houses are implementing web sites providing functionality for
performing commercial transactions over the web. It is reasonable to say that the process
of shopping on the web is becoming commonplace. The objective of this project is to
develop a general-purpose e-commerce store where any product (such as books, CDs,
computers, mobile phones, electronic items, and home appliances) can be bought from
the comfort of home through the Internet. However, for implementation purposes, this
paper will deal with an online ecommerce store. An online store is a virtual store on the
Internet where customers can browse the catalog and select products of interest. The
selected items may be collected in a shopping cart. At checkout time, the items in the
shopping cart will be presented as an order. At that time, more information will be
needed to complete the transaction. Usually, the customer will be asked to fill or select a
billing address, a shipping address, a shipping option, and payment information such as a
credit card number. An email notification is sent to the customer as soon as the order is
placed.
2
1.4 PURPOSES
The project is about to handle all the information of the shop regarding members.
Also it manages resources which were managed and handled by manpower previously.
The main purpose of the project is to integrate distinct sections of the shop into consistent
manner so that complex functions can be handled smoothly. The project aims at the
following matters,
The Server process the customers and the items are shipped to the address submitted by
them. The application was designed into two modules first is for the customers who wish
to buy the articles.
Products
Categories
Shopping Cart
Checkout
Payment methods
Shipping methods
Customer support
Products: The products that are for sale on the website. This includes product images,
descriptions, prices, and inventory levels.
3
Categories: The categories that the products are organized into. This helps users find the
products they are looking for.
Shopping cart: The shopping cart is where users add products to their purchase order. It
tracks the quantity and price of the items in the order, as well as the shipping and tax
costs.
Checkout: The checkout is where users enter their billing and shipping information and
complete their purchase.
Payment methods: The payment methods that are accepted by the website. This
typically includes credit cards, PayPal, and wire transfers.
Shipping methods: The shipping methods that are available to the user. This typically
includes standard shipping, express shipping, and overnight shipping.
Customer support: The contact information for customer support. This should include a
phone number, email address, and live chat option.
Administrator: The administrator is the super user of this application. Only admin have
access into this admin page. Admin may be the owner of the shop. The administrator has
all the information about all the users and about all products.
Manage Products
Manage Users
Manage Orders
Manage Reviews.
The system content of an ecommerce website is essential for the smooth operation of the
website and the satisfaction of customers. It is important to carefully consider the needs
of your customers and the features that your website should offer when designing the
system content.
4
CHAPTER-2
SYSTEM ANALYSIS
System Analysis refers into the process of examining a situation with the intent of
improving it through better procedures and methods. System Analysis is the process of
planning a new system to either replace or complement an existing system. But before
any planning is done the old system must be thoroughly understood and the requirements
determined. System analysis is therefore, the process of gathering and interpreting facts,
diagnosing problems and using the information to re comment improvements in the
system. System analysis is conducted with the following objectives in mind:
The current system for shopping is to visit the shop manually and from the available
product choose the item customer want and buying the item by payment of the price of
the item. These platforms allow businesses to create and manage their ecommerce
websites without having to code. They also offer a variety of features that can help
businesses to improve the customer experience, such as:
A user-friendly interface that makes it easy for customers to find and purchase
products
A secure checkout process that protects customer data
A variety of payment methods that customers can use
5
Shipping options that meet the needs of customers
Customer support that is available 24/7
Marketing tools that can help businesses to reach new customers.
In the proposed system customer need not go to the shop for buying the products. He
can order the product he wish to buy through the application in his Smartphone. The shop
owner will be admin of the system. Shop owner can appoint moderators who will help
owner in managing the customers and product orders. The system also recommends a
home delivery system for the purchased products.
Modern ecommerce websites in 2023 typically use a content management system (CMS)
to manage the system content, such as products, categories, shopping cart, checkout,
payment methods, shipping methods, customer support, blog, newsletter, social media
integration, SEO optimization, and security. Popular CMS platforms for ecommerce
websites include Shopify, WooCommerce, Magento, and BigCommerce.
6
2.4 SYSTEM REQUIREMENTS
Whatever we think need not be feasible .It is wise to think about the feasibility of any
problem we undertake. Feasibility is the study of impact, which happens in the
organization by the development of a system. The impact can be either positive or
negative. When the positives nominate the negatives, then the system is considered
feasible. Here the feasibility study can be performed in two ways such as technical
feasibility and Economical Feasibility.
Economical Feasibility
Technical Feasibility
Economical Feasibility:
7
corresponding resources .Even after the development , the organization will not be in a
condition to invest more in the organization .Therefore , the system is economically
feasible. As online shopping became a trend nowadays the regular shops are losing their
customers to online brands. Customers have effortless shopping experience and saving
time through shopping online. For competing with those online brands , If shops are
providing an online portal where their customers can shop through internet and get the
products at their doors it will increase the number of customers.
Technical Feasibility:
It is technically feasible, since there will not be much difficulty in getting required
resources for the development and maintaining the system as well. All the resources
needed for the development of the software as well as the maintenance. The user can add
the desired product into his cart by clicking add to cart option on the product. He can
view his cart by clicking on the cart button. All products added by cart can be viewed in
the cart. User can remove an item from the cart by clicking remove. After confirming the
items in the cart the user can submit the cart by providing a delivery address. On
successful submitting the cart will become empty.
8
CHAPTER-3
SYSTEM DESIGN
Input design is the link that ties the information system into the world of its
users. The input design involves determining the inputs, validating the data,
minimizing the data entry and provides a multi-user facility. Inaccurate inputs are the
most common cause of errors in data processing. Errors entered by the data entry
operators can be controlled by input design. The user-originated inputs are converted
to a computer based format in the input design. Input data are collected and organized
into groups of similar data. Once identified, the appropriate input media are selected
for processing. All the input data are validated and if any data violates any conditions,
the user is warned by a message. If the data satisfies all the conditions, it is transferred
to the appropriate tables in the database. In this project the student details are to be
entered at the time of registration. A page is designed for this purpose which is user
friendly and easy to use. The design is done such that users get appropriate messages
when exceptions occur.
Computer output is the most important and direct source of information to the
user. Output design is a very important phase since the output needs to be in an
efficient manner. Efficient and intelligible output design improves the system
relationship with the user and helps in decision making. Allowing the user to view the
sample screen is important because the user is the ultimate judge of the quality of
output. The output module of this system is the selected notifications.
Homepage:
9
Highlight special offers, new arrivals, and best-selling items.
Product Listpage:
System tools for an eCommerce website encompass a range of software solutions that
facilitate efficient store management, enhanced user experience, and business growth. These
tools include content management systems like Magento and WooCommerce, payment
gateways such as PayPal and Stripe, analytics platforms like Google Analytics, security tools
like Sucuri, inventory management systems like TradeGecko, marketing automation
platforms such as HubSpot, SEO tools like Yoast SEO, customer support solutions like
Zendesk, and performance optimization tools like Cloudflare. Employing these tools
empowers businesses to manage products, orders, payments, security, marketing, and
customer interactions effectively, ultimately contributing to a successful and streamlined
eCommerce operation.
HTML
CSS
Javascript
Typescript
Bootstrap
Angular Framework
C#.Net
[Link] Web API
MSSQL Database
Visual Studio – 2022 – Community Edition
Visual Studio Code
10
[Link] HTML
Page Structure: HTML is used to create the basic structure of web pages. It defines
headings, paragraphs, lists, and other structural elements that help organize the content on the
page.
Product Listings: HTML is used to structure product listings by creating containers for each
product. This includes images, titles, descriptions, and prices, all arranged in a consistent
layout.
Product Detail Pages: HTML structures the layout of individual product pages. It's used to
present detailed product information such as specifications, features, customer reviews, and
any related content.
Navigation and Menus: HTML is employed to build navigation menus, dropdowns, and
links that help users navigate through different sections of the eCommerce website, including
categories and subcategories of products.
[Link] CSS
CSS, or Cascading Style Sheets, is a style sheet language used to control the
presentation of a document written in HTML or XML. CSS describes how elements should
be rendered on screen, on paper, in speech, or on other media. CSS is among the core
languages of the open web and is standardized across Web browsers according to W3C
specifications.
Fonts: CSS can be used to change the font family, size, color, and weight of text.
Colors: CSS can be used to change the color of text, backgrounds, and borders.
11
Layout: CSS can be used to control the layout of elements on a page, such as the position,
size, and margins of elements.
Decorations: CSS can be used to add decorations to elements, such as borders, shadows, and
gradients.
Animations: CSS can be used to animate elements on a page, such as making them move,
fade in or out, or change color.
CSS is a powerful tool that can be used to create visually appealing and user-friendly web
pages. It is relatively easy to learn and use, and it is supported by all major web browsers.
[Link] Javascript
CSS, or Cascading Style Sheets, is a style sheet language used to control the
presentation of a document written in HTML or XML. CSS describes how elements should
be rendered on screen, on paper, in speech, or on other media. CSS is among the core
languages of the open web and is standardized across Web browsers according to W3C
specifications. JavaScript is a programming language that is used to create interactive web
pages. It is a client-side scripting language, which means that it is executed by the user's web
browser. JavaScript can be used to do a variety of things, such as:
Add interactivity to web pages: JavaScript can be used to add interactivity to web pages,
such as making buttons that can be clicked, forms that can be submitted, and images that can
be dragged and dropped.
Create animations: JavaScript can be used to create animations, such as making text scroll
across the screen or images fade in and out.
Validate user input: JavaScript can be used to validate user input, such as making sure that a
form field is filled out correctly or that a password is strong enough.
Access the DOM: JavaScript can be used to access the Document Object Model (DOM),
which is a way of representing a web page as a tree of objects. This allows JavaScript to
manipulate the content and layout of a web page.
[Link] Bootstrap
12
Bootstrap is a free and open-source front-end framework for developing websites
and web applications. It is based on HTML, CSS, and JavaScript, and it provides a variety of
pre-built components and utilities that can be used to create responsive and mobile-friendly
websites. Bootstrap is one of the most popular front-end frameworks in use today, and it is
used by a wide range of websites, including Twitter, Netflix, and Airbnb. It is a great choice
for beginners and experienced developers alike, as it provides a lot of flexibility and
customization options.
Responsive design: Bootstrap is built with responsive design in mind, which means that your
website will look good on all devices, from desktop computers to smartphones.
Mobile-friendly: Bootstrap is specifically designed to be mobile-friendly, so your website
will look great on smartphones and tablets.
Easy to use: Bootstrap is very easy to use, even for beginners. The documentation is
comprehensive and there are many tutorials available online.
Flexible: Bootstrap is very flexible and can be customized to fit your specific needs.
Popular: Bootstrap is a very popular framework, which means that there is a large
community of developers who can help you if you get stuck.
If you are looking for a free, open-source, and easy-to-use front-end framework for
developing websites and web applications, then Bootstrap is a great option. It is a powerful
tool that can help you to create responsive and mobile-friendly websites that look great on all
devices.
[Link] Typescript
TypeScript is a typed superset of JavaScript that adds static typing to the language.
This means that TypeScript code is checked for errors at compile time, which can help to
prevent bugs and improve the performance of your code. TypeScript is also a strongly typed
language, which means that variables and functions must be declared with a specific type.
This can help to improve the readability and maintainability of your code. TypeScript is a
compiled language, which means that it is converted into JavaScript code before it is
executed. This can improve the performance of your code, as the compiler can optimize the
code for the specific platform that it is running on. TypeScript is a relatively new language,
13
but it is quickly gaining popularity. It is used by a variety of companies, including Microsoft,
Google, and Amazon.
[Link] C#.Net
Performance: C# applications can be very performant, as the compiler can optimize the code
for the specific platform that it is running on.
Portability: C# code can be compiled for a variety of platforms, including Windows,
macOS, and Linux. This makes it a great choice for developing cross-platform applications.
14
Modularity: C# code can be organized into modules, which makes it easier to maintain and
reuse.
Object-oriented: C# is an object-oriented language, which makes it a good choice for
developing complex applications.
Strong typing: C# is a strongly typed language, which helps to prevent errors and improve the
readability of code.
Community: C# has a large and active community, which means that there are many
resources available to help you learn and use the language.
Syntax: C# and C++ have similar syntax, but there are some key differences. For example,
C# uses curly braces to denote blocks of code, while C++ uses semicolons.
Object-oriented programming: C# is an object-oriented language, while C++ is a multi-
paradigm language that supports object-oriented programming, procedural programming, and
functional programming.
Garbage collection: C# uses garbage collection to manage memory, while C++ does not.
This means that C# developers do not need to worry about memory leaks.
Platforms: C# code can be compiled for a variety of platforms, including Windows, macOS,
and Linux. C++ code can be compiled for a wider range of platforms, including Windows,
macOS, Linux, Android, and iOS.
Community: C# has a large and active community, while C++ has a smaller but still active
community.
15
Routing: [Link] Web API uses routing to map HTTP requests to controller actions. This
makes it easy to create consistent and predictable APIs.
Serialization: [Link] Web API supports a variety of serialization formats, including
JSON, XML, and YAML. This makes it easy to return data in a format that can be consumed
by the client.
Caching: [Link] Web API supports caching, which can improve the performance of your
APIs.
Security: [Link] Web API supports a variety of security features, such as authentication
and authorization. This helps to protect your APIs from unauthorized access.
Debugging: [Link] Web API provides a number of debugging features, such as
breakpoints and logging. This makes it easy to debug your APIs.
[Link] Web API is a powerful and versatile framework that can be used to build a wide
variety of APIs. It is a good choice for developers who need to build APIs that are secure,
performant, and easy to use.
RESTful: [Link] Web API is designed to be RESTful, which means that it follows the
principles of RESTful APIs. This makes it easy for clients to consume your APIs.
Performance: [Link] Web API is designed to be performant, and it can be used to build
APIs that can handle high volumes of traffic.
Security: [Link] Web API supports a variety of security features, such as authentication
and authorization. This helps to protect your APIs from unauthorized access.
Scalability: [Link] Web API is designed to be scalable, and it can be used to build APIs
that can handle a large number of concurrent requests.
Community: [Link] Web API has a large and active community, which means that there
are many resources available to help you learn and use the framework.
If you are looking for a framework that can help you to build secure, performant, scalable,
and RESTful APIs, then [Link] Web API is a great option. It is a powerful framework
that can help you to build a wide variety of APIs.
16
Angular is a TypeScript-based open-source front-end web application framework
led by the Angular Team at Google and by the Angular community. It is used to create
single-page applications (SPAs) that are efficient, scalable, and easy to maintain. Angular is a
powerful and versatile framework that can be used to build a wide variety of web
applications. It is a good choice for developers who need to build applications that are:
Single-page: Angular applications are single-page applications, which means that they only
load one page when the user opens the application. This makes Angular applications more
efficient and responsive than traditional multi-page applications.
Efficient: Angular applications are efficient because they use a virtual DOM. This means that
Angular only updates the parts of the DOM that need to be updated, which can improve the
performance of your application.
Scalable: Angular applications are scalable because they are built on top of TypeScript. This
makes it easy to add new features to your application without having to worry about breaking
the existing code.
Easy to maintain: Angular applications are easy to maintain because they are well-structured
and well-documented. This makes it easy to find and fix bugs and to add new features to your
application.
Store large amounts of data: MSSQL can store large amounts of data in a reliable and
efficient way.
Query data quickly: MSSQL can query data quickly and efficiently, even for large
databases.
Support complex queries: MSSQL can support complex queries, such as joins and
aggregations.
17
Be scalable: MSSQL can be scaled to handle large amounts of data and traffic.
Be secure: MSSQL has a number of security features that can help to protect your data.
Powerful: MSSQL is a powerful database that can be used to store and manage a wide
variety of data.
Reliable: MSSQL is a reliable database that can be used for mission-critical applications.
Efficient: MSSQL is an efficient database that can query data quickly and efficiently.
Scalable: MSSQL is a scalable database that can be scaled to handle large amounts of data
and traffic.
Secure: MSSQL has a number of security features that can help to protect your data.
Large community: MSSQL has a large and active community, which means that there are
many resources available to help you learn and use the database.
If you are looking for a powerful, reliable, efficient, scalable, and secure database for your
enterprise applications, then MSSQL is a great option. It is a popular choice for a reason, and
it can help you to build reliable and scalable applications that can handle large amounts of
data.
Visual Studio Community 2022 is a free, fully-featured, and extensible IDE for
creating modern applications for Android, iOS, Windows, as well as web applications and
cloud services. It is a great choice for students, open-source developers, and individual
developers.
Supports a wide range of programming languages, including C#, Visual Basic, F#,
C++, HTML, JavaScript, TypeScript, Python, and more.
Provides a powerful debugger that can help you find and fix errors in your code.
Includes a code editor that is highly customizable and easy to use.
Offers a variety of tools for testing and debugging your code.
18
Integrates with a wide range of cloud services, such as Azure.
Is extensible through the Visual Studio Marketplace, which offers thousands of
extensions that can add new features and functionality to Visual Studio.
Visual Studio Code (VS Code) is a free and open-source code editor developed by
Microsoft for Windows, Linux, and macOS. It is based on Electron, a framework that allows
web technologies to be used to create desktop applications. VS Code is designed to be
lightweight and extensible, with a large number of extensions available to add new features
and functionality. VS Code is a popular choice for web developers, as it offers built-in
support for JavaScript, TypeScript, and [Link]. It is also a good choice for other
programming languages, such as C++, C#, Python, and Java.
Lightweight and fast: VS Code is a lightweight code editor that starts up quickly and uses a
minimal amount of resources.
Extensible: VS Code is extensible through the use of extensions. There are thousands of
extensions available in the Visual Studio Marketplace, which can add new features and
functionality to VS Code.
Customizable: VS Code is highly customizable. You can change the theme, keyboard
shortcuts, and other settings to make VS Code work the way you want it to.
Integrated debugger: VS Code includes a powerful debugger that can help you find and fix
errors in your code.
Git integration: VS Code has built-in support for Git, a popular version control system. This
makes it easy to manage your code history and collaborate with others on projects.
Cloud integration: VS Code integrates with a number of cloud services, such as GitHub,
Azure, and Docker. This makes it easy to build, deploy, and run your code in the cloud.
If you are looking for a free, lightweight, and extensible code editor, then Visual Studio Code
is a great option. It is a popular choice for web developers, but it can also be used for other
programming languages.
19
[Link] SSMS Setup
SQL Server Management Studio (SSMS) is a graphical user interface (GUI) tool that
is used to manage Microsoft SQL Server instances. It provides a single environment for
managing all aspects of SQL Server, including databases, tables, stored procedures, users,
and security. SSMS is a powerful tool that can be used by database administrators (DBAs)
and developers to perform a variety of tasks, such as:
If you are a DBA or developer who needs to manage a Microsoft SQL Server instance, then
SSMS is a valuable tool that you should be familiar with.
The data flow shows the flow of information from a source to its destination. Data
flow is represented by a line, with arrowheads showing the direction of flow. Information
always flows to or from a process and may be written, verbal or electronic. Each data flow
may be referenced by the processes or data stores at its head and tail, or by a description of
its contents.
Diagram:
Registration DFD
Login DFD
20
Admin DFD
Product DFD
21
3.3.2 Login DFD
22
3.3.4 Admin DFD
Login
User Details
Product Details
23
Product Orders
Complete Order
24
3.4.3 Product Details E-R
25
3.4.5 Complete E-R Diagram
26
CHAPTER-4
PROJECT DATABASE AND TABLE
Data integration
Data integrity
Data independence
27
4.2 DATABASE TABLE LIST
28
4.2.3 User table
29
Fig 4.2.4 : Product table
30
Fig 4.2.7 Cart table
4.2.8 Order table
31
CHAPTER-5
SOFTWARE TESTING
Tool-bars work properly? Are all menu function and pull down sub function properly
listed? Is it possible to invoke each menu function using a logical assumptions that if all
parts of the system are correct, the goal will be successfully achieved? In adequate testing
or non-testing will leads to errors that may appear few months later. Testing represents an
interesting anomaly for the software engineer. During earlier software engineering
activities, the engineer attempts to build software from an abstract concept to a tangible
product. Now comes testing. The engineer creates a series of test cases that are intended
to “demolish” the software that has been built. In fact, testing is the one step in the
software process that could be viewed (psychologically, at least) as destructive rather
than constructive. Testing requires that the developer discard preconceived notions of the
“correctness” of software just developed and overcome a conflict of interest that occurs
when errors are uncovered.
While deciding on the focus of testing activities, study project priorities. For example, for
an on line system, pay more attention to response time. Spend more time on the features
32
used frequently. Decide on the effort required for testing based on the usage of the
system. If the system is to be used by a large number of users, evaluate the impact on
users due to a system failure before deciding on the effort.
The purpose of the system testing is to consider all the likely variations to which it will
be suggested and push the systems to limits. The testing process focuses on the logical
intervals of the software ensuring that all statements have been tested and on functional
interval is conducting tests to uncover errors and ensure that defined input will produce
actual results that agree with the required results. Program level testing, modules level
testing integrated and carried out.
White box sometimes called “Glass box testing” is a test case design uses the control
structure of the procedural design to drive test case. Using white box testing methods, the
following tests where made on the system,
a) All independent paths within a module have been exercised once. In our system,
ensuring that case was selected and executed checked all case structures. The bugs
that were prevailing in some part of the code where fixed
b) All logical decisions were checked for the truth and falsity of the values.
33
White box testing is a software testing technique that tests the internal structures or
workings of an application, as opposed to its functionality (i.e. black-box testing). In
white-box testing, an internal perspective of the system is used to design test cases. The
tester chooses inputs to exercise paths through the code and determine the expected
outputs. White box testing is also known as glass box testing, clear box testing, transparent
box testing, and structural testing. It is a more thorough and precise testing technique than
black box testing, but it requires access to the application's source code.
It can identify errors that are not visible to black box testing, such as logic errors
and boundary value errors.
It can help to improve the code quality by identifying potential defects early in the
development process.
It can help to improve the performance of the application by identifying
bottlenecks and inefficient code.
It can help to improve the security of the application by identifying potential
vulnerabilities.
It requires access to the application's source code, which may not be available in all
cases.
It can be more time-consuming and complex than black box testing.
It requires a good understanding of the application's code and design.
Control flow testing: This technique tests all possible paths through the application's
code.
34
Data flow testing: This technique tests all possible data flows through the application's
code.
Branch testing: This technique tests all possible branches in the application's code.
Path testing: This technique tests all possible paths through the application's code, taking
into account the conditions in the code.
Statement coverage: This technique tests all statements in the application's code.
Decision coverage: This technique tests all decisions in the application's code.
White box testing is a valuable testing technique that can help to improve the quality,
performance, and security of software applications. However, it is important to note that it
is not a silver bullet and should be used in conjunction with other testing techniques.
Black box testing focuses on the functional requirements of the software. This is black
box testing enables the software engineering to derive a set of input conditions that will
fully exercise all functional requirements for a program. Black box testing is not an
alternative to white box testing rather it is complementary approach that is likely to
uncover a different class of errors that white box methods like.
Interface errors.
Performance in data structure.
Performance errors.
Initializing and termination errors.
Black box testing is a software testing technique that tests the functionality of an
application without looking at its internal code or structure. It is also known as behavioral
testing or functional testing. In black box testing, the tester only has the application's
requirements and specifications to work with. They must then design test cases that will
exercise the application's functionality and ensure that it meets the requirements. Black
box testing is a valuable testing technique because it can be used to test any application,
regardless of its size or complexity. It is also a relatively quick and easy testing technique
to perform, which makes it a good choice for testing large or complex applications.
35
It can be used to test any application, regardless of its size or complexity.
It is a relatively quick and easy testing technique to perform.
It does not require access to the application's source code.
It can be used to test the application's functionality from the user's perspective.
It can help to identify errors that are not visible to white box testing, such as usability
errors and performance errors.
It can be less thorough than white box testing, as it does not test the application's
internal code or structure.
It can be more difficult to design effective test cases for complex applications.
It can be more difficult to identify errors that are caused by the application's internal
code or structure.
Black box testing is a valuable testing technique that should be used in conjunction
with other testing techniques, such as white box testing.
It is a good choice for testing the functionality of any application, regardless of its size
or complexity.
Equivalence partitioning: This technique divides the application's input domain into
equivalence classes, and then tests each equivalence class with a representative input
value.
Boundary value analysis: This technique tests the application's input values at the
boundaries of each equivalence class.
Stress testing: This technique tests the application under extreme conditions, such as
high volumes of traffic or long processing times.
Usability testing: This technique tests the application from the user's perspective, to
ensure that it is easy to use and understand.
Performance testing: This technique tests the application's performance under
different loads, to ensure that it can handle the expected volume of traffic.
36
CHAPTER-6
PROJECT MODEL VIEW
Register Page
Login Page
Home Page
Suggest Product page
Product List Page
Product Detail Page
Cart Page
Payment Page
Checkout Page
37
6.1.2 Login Page
38
6.1.4 Suggest Product Page
39
6.1.6 Product Detail Page
40
6.1.8 Payment Page
41
CHAPTER-7
SAMPLE CODE
[Link]
using ECommerce_API.Models;
namespace ECommerce_API.DataAccess
{
public interface IDataAccess
{
List<ProductCategory> GetProductCategories();
ProductCategory GetProductCategory(int id);
Offer GetOffer(int id);
List<Product> GetProducts(string category, string subcategory, int
count);
Product GetProduct(int id);
Product DeleteProduct(int id);
bool InsertUser(User user);
string IsUserPresent(string email, string password);
void InsertReview(Review review);
int InsertProduct(Product product);
List<Review> GetProductReviews(int productId);
User GetUser(int id);
bool InsertCartItem(int userId, int productId);
Cart GetActiveCartOfUser(int userid);
Cart GetCart(int cartid);
List<Cart> GetAllPreviousCartsOfUser(int userid);
List<PaymentMethod> GetPaymentMethods();
42
int InsertPayment(Payment payment);
int InsertOrder(Order order);
}
}
[Link]
using ECommerce_API.DataAccess;
using ECommerce_API.Models;
using [Link];
using [Link];
namespace [Link]
{
[Route("api/[controller]")]
[ApiController]
public class ShoppingController : ControllerBase
{
readonly IDataAccess dataAccess;
private readonly string DateFormat;
public ShoppingController(IDataAccess dataAccess, IConfiguration
configuration)
{
[Link] = dataAccess;
DateFormat = configuration["Constants:DateFormat"];
}
[HttpGet("GetCategoryList")]
public IActionResult GetCategoryList()
{
var result = [Link]();
return Ok(result);
}
43
[HttpGet("GetProducts")]
public IActionResult GetProducts(string category, string subcategory, int count)
{
var result = [Link](category, subcategory, count);
return Ok(result);
}
[HttpGet("GetProduct/{id}")]
public IActionResult GetProduct(int id)
{
var result = [Link](id);
return Ok(result);
}
[HttpDelete("DeleteProduct/{id}")]
public IActionResult DeleteProduct(int id)
{
var result = [Link](id);
return Ok(result);
}
[HttpPost("RegisterUser")]
public IActionResult RegisterUser([FromBody] User user)
{
[Link] = [Link](DateFormat);
[Link] = [Link](DateFormat);
string message;
if (result) message = "inserted";
else message = "email not available";
return Ok(message);
}
44
[HttpPost("LoginUser")]
public IActionResult LoginUser([FromBody] User user)
{
var token = [Link]([Link], [Link]);
if (token == "") token = "invalid";
return Ok(token);
}
[HttpPost("InsertReview")]
public IActionResult InsertReview([FromBody] Review review)
{
[Link] = [Link](DateFormat);
[Link](review);
return Ok("inserted");
}
[HttpGet("GetProductReviews/{productId}")]
[HttpPost("InsertCartItem/{userid}/{productid}")]
public IActionResult InsertCartItem(int userid, int productid)
{
var result = [Link](userid, productid);
return Ok(result ? "inserted" : "not inserted");
}
[HttpGet("GetActiveCartOfUser/{id}")]
45
public IActionResult GetActiveCartOfUser(int id)
{
var result = [Link](id);
return Ok(result);
}
[HttpGet("GetAllPreviousCartsOfUser/{id}")]
public IActionResult GetAllPreviousCartsOfUser(int id)
{
var result = [Link](id);
return Ok(result);
}
[HttpGet("GetPaymentMethods")]
public IActionResult GetPaymentMethods()
{
var result = [Link]();
return Ok(result);
}
[HttpPost("InsertProduct")]
public IActionResult InsertProduct(Product product)
{
var id = [Link](product);
return Ok([Link]());
}
[HttpPost("InsertPayment")]
public IActionResult InsertPayment(Payment payment)
{
[Link] = [Link]();
var id = [Link](payment);
return Ok([Link]());
}
46
[HttpPost("InsertOrder")]
public IActionResult InsertOrder(Order order)
{
[Link] = [Link]();
var id = [Link](order);
return Ok([Link]());
}
}
}
/* READ THIS - First Create a Database Named "ECommerce" and then Execute this File */
USE [ECommerce]
GO
/****** Object: Table [dbo].[CartItems] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CartItems](
[CartItemId] [int] IDENTITY(1,1) NOT NULL,
[CartId] [int] NOT NULL,
[ProductId] [int] NOT NULL,
CONSTRAINT [PK_CartItems] PRIMARY KEY CLUSTERED
47
(
[CartItemId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Carts] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Carts](
[CartId] [int] IDENTITY(1,1) NOT NULL,
[UserId] [int] NOT NULL,
[Ordered] [nvarchar](10) NOT NULL,
[OrderedOn] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Carts] PRIMARY KEY CLUSTERED
(
[CartId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Offers] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Offers](
[OfferId] [int] IDENTITY(1,1) NOT NULL,
[Title] [nvarchar](max) NOT NULL,
[Discount] [int] NOT NULL,
48
CONSTRAINT [PK_Offers] PRIMARY KEY CLUSTERED
(
[OfferId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Orders] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Orders](
[Id] [int] IDENTITY(1,1) NOT NULL,
[UserId] [int] NOT NULL,
[CartId] [int] NOT NULL,
[PaymentId] [int] NOT NULL,
[CreatedAt] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Orders] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[PaymentMethods] Script Date: 25-09-2022 [Link]
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PaymentMethods](
49
[PaymentMethodId] [int] IDENTITY(1,1) NOT NULL,
[Type] [nvarchar](max) NULL,
[Provider] [nvarchar](max) NULL,
[Available] [nvarchar](50) NULL,
[Reason] [nvarchar](max) NULL,
CONSTRAINT [PK_PaymentMethods] PRIMARY KEY CLUSTERED
(
[PaymentMethodId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Payments] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Payments](
[Id] [int] IDENTITY(1,1) NOT NULL,
[UserId] [int] NOT NULL,
[PaymentMethodId] [int] NOT NULL,
[TotalAmount] [int] NOT NULL,
[ShippingCharges] [int] NOT NULL,
[AmountReduced] [int] NOT NULL,
[AmountPaid] [int] NOT NULL,
[CreatedAt] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Payments] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
50
GO
/****** Object: Table [dbo].[ProductCategories] Script Date: 25-09-2022 [Link]
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ProductCategories](
[CategoryId] [int] IDENTITY(1,1) NOT NULL,
[Category] [nvarchar](50) NOT NULL,
[SubCategory] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_ProductCategories] PRIMARY KEY CLUSTERED
(
[CategoryId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Products] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Products](
[ProductId] [int] IDENTITY(1,1) NOT NULL,
[Title] [nvarchar](max) NOT NULL,
[Description] [nvarchar](max) NOT NULL,
[CategoryId] [int] NOT NULL,
[OfferId] [int] NOT NULL,
[Price] [float] NOT NULL,
[Quantity] [int] NOT NULL,
[ImageName] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Product] PRIMARY KEY CLUSTERED
51
(
[ProductId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Reviews] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Reviews](
[ReviewId] [int] IDENTITY(1,1) NOT NULL,
[UserId] [int] NOT NULL,
[ProductId] [int] NOT NULL,
[Review] [nvarchar](max) NOT NULL,
[CreatedAt] [nvarchar](100) NOT NULL,
CONSTRAINT [PK_Reviews] PRIMARY KEY CLUSTERED
(
[ReviewId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Users] Script Date: 25-09-2022 [Link] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Users](
[UserId] [int] IDENTITY(1,1) NOT NULL,
[FirstName] [nvarchar](50) NOT NULL,
52
[LastName] [nvarchar](50) NOT NULL,
[Email] [nvarchar](100) NOT NULL,
[Address] [nvarchar](100) NOT NULL,
[Mobile] [nvarchar](15) NOT NULL,
[Password] [nvarchar](50) NOT NULL,
[CreatedAt] [nvarchar](max) NOT NULL,
[ModifiedAt] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
(
[UserId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS =
ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Orders] WITH CHECK ADD CONSTRAINT [FK_Orders_Carts]
FOREIGN KEY([CartId])
REFERENCES [dbo].[Carts] ([CartId])
GO
ALTER TABLE [dbo].[Orders] CHECK CONSTRAINT [FK_Orders_Carts]
GO
ALTER TABLE [dbo].[Orders] WITH CHECK ADD CONSTRAINT
[FK_Orders_Payments] FOREIGN KEY([PaymentId])
REFERENCES [dbo].[Payments] ([Id])
GO
ALTER TABLE [dbo].[Orders] CHECK CONSTRAINT [FK_Orders_Payments]
GO
ALTER TABLE [dbo].[Orders] WITH CHECK ADD CONSTRAINT [FK_Orders_Users]
FOREIGN KEY([UserId])
REFERENCES [dbo].[Users] ([UserId])
GO
ALTER TABLE [dbo].[Orders] CHECK CONSTRAINT [FK_Orders_Users]
GO
53
ALTER TABLE [dbo].[Payments] WITH CHECK ADD CONSTRAINT
[FK_Payments_PaymentMethods] FOREIGN KEY([PaymentMethodId])
REFERENCES [dbo].[PaymentMethods] ([PaymentMethodId])
GO
ALTER TABLE [dbo].[Payments] CHECK CONSTRAINT
[FK_Payments_PaymentMethods]
GO
ALTER TABLE [dbo].[Payments] WITH CHECK ADD CONSTRAINT
[FK_Payments_Users] FOREIGN KEY([UserId])
REFERENCES [dbo].[Users] ([UserId])
GO
ALTER TABLE [dbo].[Payments] CHECK CONSTRAINT [FK_Payments_Users]
GO
ALTER TABLE [dbo].[Products] WITH CHECK ADD CONSTRAINT
[FK_Product_Offers] FOREIGN KEY([OfferId])
REFERENCES [dbo].[Offers] ([OfferId])
GO
ALTER TABLE [dbo].[Products] CHECK CONSTRAINT [FK_Product_Offers]
GO
ALTER TABLE [dbo].[Products] WITH CHECK ADD CONSTRAINT
[FK_Product_ProductCategories] FOREIGN KEY([CategoryId])
REFERENCES [dbo].[ProductCategories] ([CategoryId])
GO
ALTER TABLE [dbo].[Products] CHECK CONSTRAINT [FK_Product_ProductCategories]
GO
ALTER TABLE [dbo].[Reviews] WITH CHECK ADD CONSTRAINT
[FK_Reviews_Users] FOREIGN KEY([UserId])
REFERENCES [dbo].[Users] ([UserId])
GO
7.3.1 [Link]
54
<div class="my-container mx-auto">
</div>
7.3.2 [Link]
55
</div>
<div class="card-body">
<h5 class="card-title title"> {{[Link]}} </h5>
<h6 class="card-subtitle my-2 text-primary"> {{[Link]}} products are
available. </h6>
<p class="card-text description"> {{[Link]}} </p>
</div>
<div class="card-body">
<h5 class="card-title text-success">
{{[Link]([Link], [Link])}}
<span class="text-primary"> -{{[Link]}}%
</span>
</h5>
<h6 class="card-subtitle text-danger text-decoration-line-through">
{{[Link]}}
</h6>
</div>
56
<div class="col-md-4 overflow-hidden d-flex justify-content-center align-items-
center">
<img
src="../../assets/Images/{{[Link]}}/{{[Link]}}/[Link]"
class="img-fluid rounded-start" alt="Product Image" OpenProductDetails
[productId]="[Link]">
</div>
<div class="col d-flex flex-column">
<div class="card-header text-center">
Product
</div>
<div class="card-body">
<h5 class="card-title title"> {{[Link]}} </h5>
<p class="card-text description"> {{[Link]}} </p>
<h6 class="card-subtitle mb-3 text-primary"> {{[Link]}} products are
available. </h6>
</div>
<div class="card-body">
<h4 class="card-title text-muted">Pricing</h4>
<h2 class="card-title text-success">
{{[Link]([Link], [Link])}}
<span class="text-primary"> -{{[Link]}}% </span>
</h2>
<h5 class="card-subtitle text-danger text-decoration-line-through">
{{[Link]}}
</h5>
</div>
57
Add to Cart
<span *ngIf="![Link]()">(Login First)</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
58
</div>
</div>
<div class="card-body">
<h5 class="card-title title"> {{[Link]}} </h5>
</div>
</div>
</div>
7.3.3 [Link]
59
<td>Total Price</td>
<td class="fs-5 fw-bold text-danger"> {{[Link]}} </td>
</tr>
<tr>
<td>Shipping Charges</td>
<td class="fs-5 fw-bold text-
danger">{{[Link]}}</td>
</tr>
<tr>
<td>Discount</td>
<td class="fs-5 fw-bold text-
success">{{[Link]}}</td>
</tr>
<tr>
<td>You Have to Pay</td>
<td class="fs-5 fw-bold text-success">{{[Link]}}</td>
</tr>
</tbody>
</table>
</section>
60
</select>
</div>
</section>
61
</div>
<div class="processing">
<div class="spinner-border me-4" role="status" *ngIf="displaySpinner">
<span class="visually-hidden">Loading...</span>
</div>
<h6 class="m-0" [ngClass]="classname"> {{message}} </h6>
</div>
</div>
</section>
7.3.4 [Link]
62
<div class="image-thumbnails mt-4 d-flex justify-content-between align-items-
center">
<img
src="../../assets/Images/{{[Link]}}/{{[Link]}}/[Link]"
alt="Thumbnail Image" (click)="imageIndex = 1">
<img
src="../../assets/Images/{{[Link]}}/{{[Link]}}/[Link]"
alt="Thumbnail Image" (click)="imageIndex = 2">
<img
src="../../assets/Images/{{[Link]}}/{{[Link]}}/[Link]"
alt="Thumbnail Image" (click)="imageIndex = 3">
<img
src="../../assets/Images/{{[Link]}}/{{[Link]}}/[Link]"
alt="Thumbnail Image" (click)="imageIndex = 4">
<img
src="../../assets/Images/{{[Link]}}/{{[Link]}}/[Link]"
alt="Thumbnail Image" (click)="imageIndex = 5">
</div>
</div>
<div class="card-body">
<h1 class="card-title text-success">
{{[Link]([Link],[Link])}}
<span class="text-primary">-{{[Link]}}%</span>
</h1>
<h4 class="card-subtitle text-danger text-decoration-line-through">
63
{{[Link]}}
</h4>
</div>
<div class="card-body">
<h6 class="card-subtitle my-2 text-primary"> {{[Link]}} products are
available. </h6>
<div class="d-grid gap-2">
<button type="button" class="btn btn-outline-success"
[disabled]="![Link]()"
(click)="[Link](product)">Add to Cart
<span *ngIf="![Link]()">(Login First)</span>
</button>
</div>
</div>
<div class="card-body">
<h5 class="card-text">Description</h5>
<ul class="list-group">
<li class="list-group-item list-group-item-action"
*ngFor="let item of [Link]('. ')">
{{item}}
</li>
</ul>
</div>
</div>
</div>
</div>
64
CHAPTER-8
CONCLUSION
The ecommerce market is rapidly growing, and businesses that want to stay ahead
of the curve need to have a strong online presence. A well-designed and user-friendly
ecommerce website is essential for attracting and converting customers. Businesses also
need to provide excellent customer service, both before and after a sale. By focusing on
these areas, businesses can position themselves for success in the ecommerce market in
2023 and beyond. The ecommerce market is expected to reach $4.9 trillion in sales by
2023, up from $3.5 trillion in 2020. This growth is being driven by a number of factors,
including the increasing popularity of smartphones and tablets, the growth of social
media, and the rise of online marketplaces. In order to compete in this growing market,
businesses need to have a strong online presence. This means having a well-designed and
user-friendly ecommerce website that is easy to navigate and use. The website should
also be mobile-friendly, as more and more people are shopping online from their
smartphones and tablets. In addition to having a good website, businesses also need to
provide excellent customer service.
Here are some additional tips for businesses that want to succeed in the ecommerce
market in 2023:
Use data and analytics to track website traffic and sales, and to make informed
decisions about marketing and product development.
Stay up-to-date on the latest ecommerce trends, such as mobile commerce, social
commerce, and artificial intelligence.
Build a strong brand and reputation, as this will help to attract and retain
customers.
Invest in marketing and advertising to reach a wider audience.
Offer competitive prices and discounts.
Provide excellent customer service.
65
CHAPTER-9
FUTURE WORK
The customer experience is more important than ever before. Businesses need to
focus on providing a positive and seamless shopping experience for their customers. This
includes offering a variety of payment options, providing excellent customer service, and
making it easy for customers to return items.
66
CHAPTER-10
REFERENCES
[1] About FreeNest, official website of the FreeNest development platform. Accessed on 22
April 2013. Http://[Link]/about.
[4] Complete CSS Guide ,Maxine Sherrin and John Allsopp-O'Reilly Media; September
2012.
[5] Carmona C.J., Ramírez-Gallego, S., Torres, F., Bernal, E., Del Jesus, M. J. & García, S.,
Web Usage Mining to Improve the Design of an eCommerce Website: [Link],
Expert Syst. Appl., 39(12), pp. 11243-11249, 2012.
[6] Thorleuchter, D., Poel, D. van den, & Prinzie, A., Analyzing Existing Customers’
Websites to Improve the Customer Acquisition Process as Well as the Profitability
Prediction in B-to-B Marketing, Expert Syst. Appl., 39(3), pp. 2597-2605, 2012.
[7] Thorleuchter, D. & Poel, D. van den, Using Webcrawling of Publicly Available Websites
to Assess E-Commerce Relationships, presented at the Annual SRII Global.
67
JOURNAL PUBLISH CERTIFICATE
68