You are on page 1of 56

A

Project Report

On

Car Accessories E commerce


Submitted by

Omkar Bhagwan Kmable


Roll No.: 23305

MCA–I

SEM–I

Under the guidance of

Dr. Ramesh Jadhav


For the Academic Year 2023-24

Sinhgad Technical Education Society’s

Sinhgad Institute of Management

Vadgaon Bk Pune 411041

(Affiliated to SPPU Pune & Approved by AICTE New Delhi)


Date:

CERTIFICATE

This is to certify that Mr. Omkar Bhagwan Kamble has successfully


completed his project work entitled “Car Accessories E-
commerce” in partial fulfillment of MCA – I SEM –I Mini Project
for the year 2023-2024. he has worked under our guidance and
direction.

Dr. Ramesh Jadhav Dr. Chandrani Singh


Project Guide Director, SIOM-MCA

Examiner 1 Examiner 2

Date:

Place: Pune
DECLARATION

I certify that the work contained in this report is original and has
been done by me under the guidance of my guide.
 The work has not been submitted to any other Institute for any degree
or diploma.
 I have followed the guidelines provided by the Institute in preparing
the report.
 I have conformed to the norms and guidelines given in the Ethical
Code of Conduct of the Institute.
 Whenever I have used materials (data, theoretical analysis,
figures, and text) from other sources, I have given
due credit to them by citing them in the text of the report
and giving their details in the references.

Name and Signature of Project Team Members:

Sr. Seat No. Name of students Signature of


No. students

1 Omkar Bhagwan Kamble


ACKNOWLEDGEMENT

It is very difficult task to acknowledge all those who have been of tremendous

help in this project. I would like to thank my respected guide Dr. Ramesh

Jadhav for providing me necessary facilities to complete my project and also for

their guidance and encouragement in completing my project successfully

without which it wouldn’t be possible. I wish to convey my special thanks and

immeasurable feelings of gratitude towards Dr. Chandrani Singh, Director,

SIOM-MCA. I wish to convey my special thanks to all teaching and non-

teaching staff members of Sinhgad Institute of Management, Pune for their

support.

Thank You

Yours Sincerely,

Omkar Bhagwan Kamble


INDEX

Sr. No. Chapter Page No.


1 CHAPTER 1: INTRODUCTION
1.1 Abstract
1.2 Existing System and Need for System
1.3 Scope of System
1.4 Operating Environment Hardware and Software
1.5 Brief Description of Technology Used
2 CHAPTER 2: PROPOSED SYSTEM
2.1 Feasibility Study
2.2 Objectives of the proposed system
2.3 Users of the system
3 CHAPTER 3: ANALYSIS AND DESIGN
3.1 Entity Relationship Diagram (ERD)
3.2 Class Diagram
3.3 Use Case Diagrams
3.4 Activity Diagram
3.5 Sequence Diagram
3.6 Component Diagram
3.7 Module and Hierarchy Diagram
3.8 Table Design
3.9 Data Dictionary
3.10 Sample Input and Output Screens
(Screens must have valid data. All reports must have
at-least 5 valid records.)
4 CHAPTER 4: CODING Sample code
5 CHAPTER 5: LIMITATIONS OF SYSTEM
6 CHAPTER 6: PROPOSED ENHANCEMENTS
7 CHAPTER 7: CONCLUSION
8 CHAPTER 8: BIBLIOGRAPHY
1: INTRODUCTION

1.1 Abstract

Electricity consumers are often faced


with
the problem of inaccuracy and delay
in monthly billing
due to the drawback in reading
pattern and human
errors. Thus, it is essential to have an
efficient system for
such purposes via electronic platform
with consideration
to proximity. The proposed system
automates the
conventional process of paying
electricity bill by visiting
the Electricity Board which is
tiresome and time
consuming. It is also designed to
automate the electricity
bill calculation and payment for user
convenience. The
system is developed with Microsoft
Visual Studio using
C# as the base programming language
which can be used
to develop websites, web
applications and web services.
The Microsoft Structured Query
Language (SQL) server
is also used for creating back-end
database. The system
would be having two logins: the
administrative and user
login. The administrator can view
the user’s account
details and can add or update the
customer’s information
of consuming units of energy of the
current month in
their account. The Admin has to feed
the system with the
electricity usage data into respective
users account. The
system then calculates the electricity
bill for every user
and updates the information into
their account every
month. Users can then view their
electricity bill and pay
before the month end.
Electricity consumers are often faced
with
the problem of inaccuracy and delay
in monthly billing
due to the drawback in reading
pattern and human
errors. Thus, it is essential to have an
efficient system for
such purposes via electronic platform
with consideration
to proximity. The proposed system
automates the
conventional process of paying
electricity bill by visiting
the Electricity Board which is
tiresome and time
consuming. It is also designed to
automate the electricity
bill calculation and payment for user
convenience. The
system is developed with Microsoft
Visual Studio using
C# as the base programming language
which can be used
to develop websites, web
applications and web services.
The Microsoft Structured Query
Language (SQL) server
is also used for creating back-end
database. The system
would be having two logins: the
administrative and user
login. The administrator can view
the user’s account
details and can add or update the
customer’s information
of consuming units of energy of the
current month in
their account. The Admin has to feed
the system with the
electricity usage data into respective
users account. The
system then calculates the electricity
bill for every user
and updates the information into
their account every
month. Users can then view their
electricity bill and pay
before the month end.
Electricity consumers are often faced with the problem of inaccuracy and
delay in monthly billing due to the drawback in reading pattern and
human errors. Thus, it is essential to have an efficient system for such purposes
via electronic platform with consideration to proximity. The proposed
system automates the conventional process of paying electricity bill by
visiting the Electricity Board which is tiresome and time consuming. It is
also designed to automate the electricity bill calculation and payment for
user convenience. The Microsoft Structured Query Language (SQL) server is
also used for creating back-end database. The system would be having two
logins: the administrative and user login. The administrator can view the
user’s account details and can add or update the customer’s information of
consuming units of energy of the current month in their account. The
Admin has to feed the system with the electricity usage data into respective
users account. The system then calculates the electricity bill for every user
and updates the information into their account every month. Users can then
view their electricity bill and pay before the month end.
1.2 Existing System and Need for System

Existing System:
In existing system following are key point:
 Limited Accessibility: Traditional stores and physical suppliers often have
limited geographical reach. Customers may need to travel long distances to
access a diverse range of car accessories, which can be time-consuming and
costly.

 Limited Product Information: Physical stores may provide limited


information about car accessories and auto parts, making it challenging for
customers to make informed purchasing decisions. Comprehensive product
details, specifications, and customer reviews are often lacking.
Need for System:

The need for a new system arises from several factors:

 Enhanced Accessibility: The e-commerce platform provides a global reac


h, allowing customers from various locations to access an extensive catal
og of car accessories and auto parts, eliminating the need for physical trav
el.

 Comprehensive Product Information: Detailed product descriptions, speci


fications, high-quality images, and customer reviews empower customers
with the information they need to make informed purchasing decisions.

 Efficient Ordering: The system streamlines the ordering process by enabli


ng customers to place orders online, reducing manual intervention, errors,
and processing time.

 Secure Transactions: A secure payment gateway ensures the confidentiali


ty of customer data and financial information, mitigating security concern
s associated with traditional payment methods.
1.3 Scope of System:

 Product Catalog: The system will include an extensive product


catalog showcasing a variety of car accessories and autoparts , with
detailed product information.

 User Management: Users will be able to create accounts, log in,


and manage their profiles. Registered users will have access to
personalized features like order history and saved preferences.

 Secure Transactions: The system will implement a secure payment


gateway to enable users to make transactions confidently while
protecting their financial information.

 Search and Filter: Robust search and filtering capabilities will


allow users to easily find the cr accessories and auto parts they
need based on criteria such as tool type, size, material, and price.

 Responsive Design: The system will be responsive, ensuring


optimal user experiences on various devices, including desktops,
tablets, and mobile phones.
1.4 Operating Environment Hardware and Software

Server side requirement

1.Hardware Requirements
Processor: AMD Ryzen 3
RAM: 4GB
HDD: 256GB

2. Software Requirements:
Operating System: Windows 10
Database: MySQL
Front End: JSP , SEVELET, SpringBoot , Bootstrap
Server Side Script: JAVA, Tomcat
Software Development Tool : Java 11 , Intellij idea

Client-side requirement

1.Hardware Requirements:
Processor AMD Ryzen 3
RAM: 4GB

2.Software Requirements:
Operating System : Windows 10
Browser : Crome , Brave
1.5 Brief Description of Technology Used JAVA:

Java is one of the most popular and widely used programming language
and platform. A platform is an environment that helps to develop and run pro-
grams written in any programming language. Java is fast, reliable and secure.
From desktop to web applications, scientific supercomputers to gaming
consoles, cell phones to the Internet, Java is used in every nook and corner. Java
is a programming language and computing platform first released by Sun
Microsystems in 1995. There are lots of applications and websites that will not
work unless you have Java installed, and more are created every day. Java is
fast, secure, and reliable. From laptops to datacenters, game consoles to
scientific supercomputers, cell phones to the Internet, Java is everywhere! Java
is a general-purpose, concurrent, object-oriented, classbased, and the run- time
environment (JRE) which consists of JVM which is the cornerstone of the Java
platform. This blog on what is Java will clear all your doubts about why to learn
java, features and how it works.

JDK:
The Java Development Kit (JDK) is an implementation of either one of
the Java Platform, Standard Edition, Java Platform, Enterprise Edition, or Java
Platform, Micro Edition platforms released by Oracle Corporation in the form
of a binary product aimed at Java developers on Solaris, Linux, macOS or
Windows. The JDK includes a private JVM and a few other resources to finish
the development of a Java Application. Since the introduction of the Java
platform, it has been by far the most widely used Software Development Kit
(SDK). On 17 November 2006, Sun announced that they would release it under
the GNU General Public License (GPL), thus making it free software. This
happened in large part on 8 May 2007, when Sun contributed the source code to
the OpenJDK.
2. PROPOSED SYSTEM

Proposed System:
Key Components of the Proposed System:

 User Registration and Authentication: The system will allow users to


create accounts, providing essential information such as name, contact
details, and shipping address. Account creation ensures a personalized
experience and the ability to track orders.

 Product Catalog: A comprehensive catalog of carbide tools will be


featured on the website, complete with product descriptions,
specifications, high-resolution images, and pricing information. Products
will be organized into categories and subcategories for easy navigation.

 Search and Filter Functionality: Users can search for specific car
accessory by name, size, length, diameter, category, or material.
Advanced filtering options will enable users to refine their searches based
on criteria like price range, brand, and specifications.

 Product Details: Detailed product pages will provide in-depth information


about each car accessory, including material, dimensions, applications,
and customer reviews. Users can add items to their shopping carts
directly from these pages.

 Shopping Cart: A user-friendly shopping cart system will allow


customers to review, modify, and finalize their orders. The cart will
display the total cost, including taxes and shipping fees, before checkout.

 Secure Checkout: The system will integrate a secure payment gateway to


facilitate smooth and secure transactions. Multiple payment options,
including credit/debit cards and digital wallets, will be supported.

 Order Management: Registered users can track their order status and
history. They will receive email notifications at various stages of the
order processing, from order confirmation to shipment tracking.
 User Reviews and Ratings: Customers can leave reviews and ratings for
products they have purchased, helping others make informed decisions.

 Responsive Design: The website will be responsive, ensuring a seamless


user experience across devices, including desktops, tablets, and
smartphones.

 Admin Panel: An admin panel will be provided for site administrators to


manage products, user accounts, orders, and site content. Administrators
can also generate reports to gain insights into site performance.

 Customer Support: The system will offer multiple customer support


channels, including live chat and email, to address customer inquiries and
concerns promptly.

2.1 Feasibility Study:

 Technical Feasibility
 Java: Java is a mature and widely used programming language kn
own for its portability, scalability, and robustness. Leveraging Jav
a as the core programming language for the e-commerce site ensur
es platform independence, allowing it to run on various operating
systems.

 JSP (Java Server Pages) and Servlets: JSP and Servlets are funda
mental components of the Java EE (Enterprise Edition) stack, spec
ializing in dynamic web page creation and handling user interactio
ns. They enable the development of responsive and interactive we
b interfaces, making them suitable for building an e-commerce sit
e with rich features.

 Hibernate: Hibernate is an Object-Relational Mapping (ORM) fra


mework that simplifies database interactions by mapping Java obj
ects to database tables. Its use in this project streamlines data man
agement, enhancing data integrity and performance.

 Relational Database: An e-commerce site for carbide tools require


s efficient data storage and retrieval. Hibernate, in combination wi
th a relational database management system (RDBMS) such as M
ySQL or PostgreSQL, ensures organized and structured data stora
ge. This choice supports complex queries, relationships, and trans
actions.

 Payment Gateways: Integrating secure and reliable payment gate


ways, such as PayPal or Stripe, is crucial for processing online tra
nsactions securely.

 Economic Feasibility
 Cost Analysis: The economic feasibility analysis begins with
a comprehensive cost assessment. This includes the initial develo
pment costs, which involve hiring skilled Java developers, web de
signers, and database administrators to build and launch the platfo
rm. Additionally, ongoing operational costs such as hosting, maint
enance, and marketing expenses need to be factored in.

 Revenue Projections: Revenue generation is a central aspect of ec


onomic feasibility. Projections are made based on the expected sal
es volume, average order value, and pricing strategy for car
accessories . Market research and competitive analysis are instru
mental in estimating the potential market share and revenue growt
h.

 Return on Investment (ROI): Calculating the ROI involves compa


ring the expected returns from the e-commerce site to the initial in
vestment. This metric helps stakeholders determine how long it wi
ll take to recoup the development and operational expenses and st
art generating profit.

 Scalability and Growth Potential: Economic feasibility also involv


es assessing the scalability of the e-commerce site. Can it handle a
n increase in traffic and transactions without a proportionate incre
ase in costs? Identifying opportunities for growth, such as expandi
ng product offerings or entering new markets, is crucial.

 Operational Feasibility
 User-Friendly Interface: The operational feasibility of our e-comm
erce site begins with its user-friendly interface. The Java, JSP, Servlet, an
d Hibernate technologies allow for the creation of an intuitive and respon
sive website, making it easy for users to navigate, search for products, an
d complete transactions. This user-friendliness ensures that both tech-sav
vy and non-technical users can interact with the platform comfortably.

 Scalability: One of the key operational aspects is the platform's ability to


scale with the growth of the business. Using Java and Hibernate, our e-co
mmerce site can accommodate an expanding product catalog, increased u
ser traffic, and additional features without compromising performance. T
his scalability is essential for adapting to changing business requirements.

 Maintenance and Updates: The operational feasibility study also consider


s the ease of maintaining and updating the system. Java, JSP, Servlet, and
Hibernate offer a structured and modular approach to development, maki
ng it relatively straightforward to add new features, fix bugs, and apply se
curity patches. This ensures that the e-commerce platform can be efficient
ly maintained over time.
2.2 Objectives of the proposed system:
The objectives of the e-commerce system for car accessories are to create a
robust and feature-rich platform that serves the needs of both customers and
administrators. The following are the primary objectives:

 User-Friendly Interface: Design a user-friendly and intuitive


interface that encourages easy navigation and product discovery.

 Comprehensive Product Listings: Ensure an extensive and up-to-


date product catalog, including detailed descriptions and images for
each car accessory

 Security: Implement robust security measures to protect user data


and financial information during transactions.

 Personalization: Provide registered users with personalized


features, such as order history, saved preferences, and
recommendations based on their browsing and purchase history.

2.3 Users of the system:


There are 2 Users present in the application:
1. Admin 2. Customer

Admin :
The administrator is the master user of this application
Responsibility of admin includes:

• Creating new customers


• View Customers Details
• inserting product and update product
• Update Status of payment
• Calculating bill
Customer :

Customer’ Functionality includes:

• New Customer can register


• Login using username and password
• View and choose the product
• add product to cart
• do payment
• check status of order
• do quotation of product
3. ANALYSIS AND DESIGN

3.1 Entity Relationship Diagram (ERD):


3.2 Class Diagram :
3.3 Use Case Diagram :
Activity Diagram :
User:
Order:
Admin:
3.5 Use Case Diagram : (User)

Admin:
3.6 Sequence Diagram :
3.6 Table Design :
 Table:
The given below table is a snapshot of backend view of the localhost and the
structures of the tables present in Car Acessories Ecomerce. The tables present
are Login, customer, bill , meter , tax

Product Details
Field name Data Type constraint Description

Cart_item_id BigInt Primary key Cart item id

Our_price Float Not Null Our price

quantity BigInt Not Null quantity

Total_price Float Not Null Total Price

Product_id BIgInt Primary key Product id

Shopping_cart_id BigInt Primary key Shopping Cart Id

Category
Field name Data Type constraint Description

Category_id BIGINT Primary key Category id

Description VARCHAR(255) Not Null Description

Is_active BIT(1) Not Null Is active

Is_deleted BIT(1) Not Null Is deleted

name VARCHAR(255) Not Null name


Customer
Field name Data Type constraint Description
customer_id BIGINT Primary key Customer id
address1 VARCHAR(255) Not Null address1
address2 VARCHAR(255) Not Null address2
city VARCHAR(255) Not Null city
company VARCHAR(255) Not Null company
first_name VARCHAR(255) Not Null First name
is_deleted BIT(1) Not Null Is deleted
last_name VARCHAR(255) Not Null Last name
password VARCHAR(255) Not Null password
phone VARCHAR(255) foreign key phone
postal_code VARCHAR(255) Not Null Postal code
state VARCHAR(255) Not Null state
username VARCHAR(255) Not Null username
country_id BIGINT Primary key Country id

Order
Field name Data Type constraint Description
order_id BIGINT Primary key order id
delivery_date DATETIME Not Null Delivery date
description VARCHAR(255) Not Null description
grand_total FLOAT Not Null Grand total
is_deleted BIT(1) Not Null Is deleted
order_date VARCHAR(255) Not Null Order date
order_status VARCHAR(255) Not Null Order status
payment_method VARCHAR(255) Not Null Payment
method
shipping_method VARCHAR(255) Not Null Shipping
method
shipping_total FLOAT foreign key Shipping total
sub_total FLOAT Not Null Sub total
tax_rate FLOAT Not Null Tax rate
tax_total FLOAT Not Null Tax total
customer_id BIGINT Primary key customer id
Product
Field name Data Type constraint Description
Product_id BIGINT Primary key Product id
code DATETIME Not Null Code
cost_price FLOAT Not Null Cost price
description VARCHAR(255) Not Null description
image1 VARCHAR(255) Not Null image1
Image2 VARCHAR(255) Not Null Image2
Image3 VARCHAR(255) Not Null Image3
is_active BIT(1) Not Null Is active
is_deleted BIT(1) Not Null Is deleted
name FLOAT Not Null name
our_price FLOAT Not Null Our price
sale_price FLOAT Not Null Sale price
stock_qty Int Not Null Stock qty
customer_id BIGINT Primary key customer id
Shopping cart
Field name Data Type constraint Description

shopping_cart_id BIGINT Primary key Shopping cart


id

Description VARCHAR(255) Not Null Description

grand_total FLOAT Not Null Grand total

payment_method VARCHAR(255) Not Null Payment


method

shipping_method VARCHAR(255) Not Null Shipping


method

shipping_total FLOAT Not Null Shipping total

sub_total FLOAT Not Null Sub total

tax_rate FLOAT Not Null Tax rate

tax_total FLOAT Not Null Tax total

customer_id BIGINT Primary key Customer id


User
Field name Data Type constraint Description
user_id BIGINT Primary key User id
first_name VARCHAR(255) Not Null First name
is_active BIT(1) Not Null Is active
is_deleted BIT(1) Not Null Is deleted
last_name VARCHAR(255) Not Null Last name
password VARCHAR(255) Not Null Password
username VARCHAR(255) Not Null Username

Quotation
Field name Data Type constraint Description
Quote_id BIGINT Primary key Quote id
Name VARCHAR(255) Not Null name
company VARCHAR(255) Not Null company
Contact INT Foreign key contact
Tool_name VARCHAR(255) Not Null Tool name
Description VARCHAR(255) Not Null Description
Price FLOAT Not Null Price
Date DATETIME Not Null Date
3.10 Sample Input and Output Screens :

Frontend:
4 : CODING Sample Code :

import javax.validation.Valid;
import nazeem.autoparts.library.model.Category;
import nazeem.autoparts.library.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("/category")
public class CategoryController {
@Autowired
private CategoryService categoryService;
private String add_edit_template="/category/add-edit-category";
private String list_template="/category/list-category";
private String list_redirect="redirect:/category/list";
@GetMapping("/add")
public String addCategory(Category category, Model model){
model.addAttribute("category", category);
return add_edit_template;
}
@GetMapping("/edit/{id}")
public String editCategory(@PathVariable("id") int id, Model model){
Category category = categoryService.get(id); model.addAttribute("category",
category);
return add_edit_template;
}
@PostMapping("/save")
public String saveCategory(@Valid @ModelAttribute("category") Category
category, BindingResult result, Model model){
model.addAttribute("category", category);
if(result.hasErrors()){
return add_edit_template;
}
categoryService.save(category);
return list_redirect+"?success";
}
/*@GetMapping("/delete/{id}")
public String deleteCategory(@PathVariable("id") int id, Model model) {
categoryService.delete(id);
return list_redirect+"?deleted";
}*/
@GetMapping("/list")
public String listCategory(Model model) {
List<Category> listCategories = categoryService.findAll();
model.addAttribute("listCategories", listCategories);
return list_template;
}
}
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class DashboardController {
@RequestMapping("/")
public String index() {
return "/dashboard/index";
}
// Added to test 500 page
@RequestMapping(path = "/tigger-error", produces =
MediaType.APPLICATION_JSON_VALUE)
public void error500() throws Exception {
throw new Exception();
}
}
import nazeem.autoparts.library.model.User;
import nazeem.autoparts.library.service.UserService;
import nazeem.autoparts.library.web.dto.UserRegistrationDto;
import org.springframework.beans.factory.annotation.Autowired;import
org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import javax.validation.Valid;
@Controller
public class LoginController {
@Autowired
private UserService userService;
@GetMapping("/login")
public String login(Model model) {
return "/auth/login";
}
@GetMapping("/register")
public String register(Model model) {
UserRegistrationDto userRegistrationDto = new
UserRegistrationDto();
model.addAttribute("userRegistrationDto", userRegistrationDto);
return "/auth/register";
}
@PostMapping("/register")
public String registerUserAccount(@Valid
@ModelAttribute("userRegistrationDto") UserRegistrationDto
userRegistrationDto, BindingResult result, Model model) {
model.addAttribute("userRegistrationDto", userRegistrationDto);
User userExists =
userService.findByUsername(userRegistrationDto.getUsername());
//System.out.println("user-->"+userRegistrationDto.getUserName());
//System.out.println("userExists-->"+userExists);
if (userExists != null) {
return "redirect:/register?username";
}
if(result.hasErrors()){
return "/auth/register";
}
userService.save(userRegistrationDto);
return "redirect:/register?success";
}
}
Frontend:
import nazeem.autoparts.library.model.*;
import nazeem.autoparts.library.service.*;
import nazeem.autoparts.library.util.Utility;
import org.springframework.beans.factory.annotation.Autowired;import
org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@Controller
public class HomeController {
@Autowired
private MakeService makeService;
@Autowired
private ModelService modelService;
@Autowired
private Utility utility;
@Autowired
ProductService productService;
@RequestMapping("/")
public String index(Model model) {
model.addAttribute("classActiveHome", "home active ");
List<Make> listMake = makeService.findAll();
model.addAttribute("listMake", listMake);
List<nazeem.autoparts.library.model.Model> listModel =
modelService.getModels(listMake.get(0).getId());
model.addAttribute("listModel", listModel);
List<Integer> listYear = utility.getYears();
model.addAttribute("listYear", listYear);
List<Product> productList = productService.findAllByActive();
model.addAttribute("productList", productList);
//Getting top 4
List<Product> productList2 =
productService.topMostOrderedProducts(8);
model.addAttribute("productList2", productList2);
return "/client/home";
}
@RequestMapping("/about-us")
public String aboutUs(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/about-us";
}
@RequestMapping("/contact-us")
public String contactUs(Model model) {
model.addAttribute("classActivePages", "home active "); return "/client/contact-
us";
}
@RequestMapping("/faq")
public String faq(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/faq";
}
@RequestMapping("/privacy-policy")
public String privacyPolicy(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/privacy-policy";
}
@RequestMapping("/return-policy")
public String returnPolicy(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/return-policy";
}
@RequestMapping("/terms-and-conditions")
public String termsAndConditions(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/terms-and-conditions";
}
@RequestMapping(value = "/models")
@ResponseBody
public List<Dropdown> getModels(@RequestParam Long make) {
List<nazeem.autoparts.library.model.Model> modelList =
modelService.getModels(make);
List<Dropdown> dropdownList=new ArrayList<>();
for (nazeem.autoparts.library.model.Model model: modelList) {
dropdownList.add(new Dropdown(model.getId(), model.getName()));
}
return dropdownList;
}
// Added to test 500 page
@RequestMapping(path = "/tigger-error", produces =
MediaType.APPLICATION_JSON_VALUE)
public void error500() throws Exception {
throw new Exception();
}
}
import nazeem.autoparts.library.model.Category;
import nazeem.autoparts.library.model.Make;
import nazeem.autoparts.library.service.CategoryService;
import nazeem.autoparts.library.service.MakeService;
import nazeem.autoparts.library.service.ModelService;
import nazeem.autoparts.library.service.ProductService;
import nazeem.autoparts.library.model.Product;
import nazeem.autoparts.library.util.Utility;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Controller;import
org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@Controller
public class PartController {
@Autowired
CategoryService categoryService;
@Autowired
private ProductService productService;
@Autowired
private MakeService makeService;
@Autowired
private ModelService modelService;
@Autowired
private Utility utility;
private final Integer PAGE_SIZE=2;
@RequestMapping("/category")
public String category(@RequestParam("id") Optional<Long> id
, Model model
, @RequestParam("page") Optional<Integer> page
, @RequestParam("size") Optional<Integer> size) {
int currentPage = page.orElse(1);
int pageSize = size.orElse(PAGE_SIZE);
model.addAttribute("classActiveCategory", "home active ");
//Get all categories
List<Category> categoryList = categoryService.findAll();
model.addAttribute("categories", categoryList);
//Get selected product & category
Page<Product> productList;
Category category;
if (id.isPresent()) {
productList = productService.searchResults("",
id.get().toString(), "1", "1", "", PageRequest.of(currentPage-1,
pageSize));
//productList = productService.findAllByCategoryId(id.get(),
PageRequest.of(currentPage-1, pageSize));
category = categoryService.get(id.get());
} else {
productList = productService.searchResults("", "", "1", "1",
"", PageRequest.of(currentPage-1, pageSize));
//productList = productService.findPaginated("",
PageRequest.of(currentPage-1, pageSize));
category = new Category();
category.setName("All Categories");
}

5 : Limitations of System:

Limited scalability: The system may struggle to handle sudden spikes in


traffic or increased demand during peak periods.
• Security vulnerabilities: It might be prone to cybersecurity threats like
data breaches or hacking due to potential loopholes in security measures.
• Lack of personalization: Inadequate customization options may restrict
the ability to tailor the user experience for individual customers.
• Compatibility issues: It could face challenges in integrating with newer
technologies or software updates, potentially causing functionality issues.
• Performance bottlenecks: Slow loading times or processing delays may
hinder the overall user experience, impacting customer satisfaction
6 : Proposed Enhancement

• Diverse Payment Options: Integrate various payment gateways


(credit/debit cards, PayPal, digital wallets) to offer customers flexibility
in their payment methods.
• Customized Quotation System: Implement a quoting system where
customers can request custom quotes for bulk orders or specific tool
configurations. This could involve a form where they input quantities,
specifications, and receive tailored pricing.
• Payment Security Measures: Strengthen the site's security protocols by
using SSL certificates, encryption, and two-factor authentication to
safeguard sensitive payment information and build customer trust.

7 : Conclusion

In conclusion, while the ecommerce site for car accessories e commerce offers a
valuable
platform, its success hinges on addressing key areas like scalability, security,
personalization, compatibility, and performance. Investing in these aspects can
significantly enhance user experience, security measures, and adaptability,
ensuring sustained growth and customer satisfaction within the competitive
market of car accessories and tools.

8: Bibliography

• https://autoparts.nz/
• https://www.youtube.com/watch?v=jdBYwqmMMxU&list=PL0zysOflR
CekMr91amXBNwWku4PmeFaFD
• https://www.autopartscorner.com/

You might also like