Online Vegetable Selling Project
Online Vegetable Selling Project
NITHISH S
1U21CA057
Mr.C.MANIVASAGAN., MCA.,M.Phil.,SET
Assistant Professor,
REG NO:1U21CA057
Bonafide Certificate
This is to certify that the project work entitled “ONLINE VEGETABLE SELLING
WEBSITE ” done by NITHISH S , during the period December 2023 to March 2024 in
partial fulfillment of the degree of Bachelor of Computer Applications is submitted for the
project evaluation and Viva voce held at the School of Computer Studies, RVS College of
Arts and Science, Sulur, Coimbatore on
Examiners:
Internal Examiner:
External Examiner: z
CERTIFICATE
CERTIFICATE
This is to certify that the project entitled ONLINE VEGETABLE SELLING WEBSITE,
submitted the School of Computer Studies ,Bachelor of Computer Applications RVS College
of Arts and Science in partial fulfillment of the requirements for the award of the Degree of
Bachelor Computer Applications is a cord of original project by NITHISH S with register
number 1U21CA057 during the period December 2023 to March 2024 under my internal
supervision and the project has not formed the basis for the award of any
Degree/Diploma/Associate ship/Fellowship or other similar title to any candidate of any
University.
Internal supervisor
DECLARATION
DECLARATION
I NITHISH S hereby declare that the project, entitled ONLINE VEGETABLE SELLING
WEBSITE, Bachelor of Computer Applications, RVS College of Arts and Science in partial
fulfillment of the requirements for the award of the Degree of Bachelor of Computer Applications
is a record of original work done by me during the period February 2024 to May 2024 under the
internal supervision of Mr.C.MANIVASAGAN, Assistant Professor, School of Computer Studies,
Bachelor of Computer Applications, RVS College of Arts and Science it has not formed the basis
for the award of any Degree/Diploma/Associate ship/Fellowship or other similar title to any
candidate of any University.
If words are considered as symbols of approval and tokens of acknowledgement, then the words
play the heralding role of expressing my gratitude to all who have helped me directly or indirectly
during my project work.
I express my sincere gratitude to the esteemed Managing Trustee of RVS College of Arts and
Science, DR.K.Senthil Ganesh for allowing me to do my project with his moral support.
I will be ever graceful and thankful to, prof.Saramma Samuel Secretary, RVS College of Arts
and Scienec for allowing me to do my project with his moral support.
It gives me immense pleasure to take this opportunity to express my gratitude and thanks to
DR.P.Navaneetham,M.Sc.M.Phil.,Ph.D., Associate Professor & Director Administration, School
of Computer Studies, RVS College of Arts and Science for his continuous encouragement and
blessings.
NITHISH S
ABSTRACT
ABSTRACT
FreshGreens is a dynamic online platform designed to revolutionize the way you shop for
vegetables. With an intuitive user interface crafted using HTML, CSS, and JavaScript,
FreshGreens offers a seamless shopping experience for customers seeking the freshest
produce. Our website boasts a visually appealing design that enhances user engagement and
navigation. Through responsive web design principles, FreshGreens ensures accessibility
across various devices.
Customers can easily browse through a diverse range of locally sourced, organic, and seasonal
vegetables. At FreshGreens, we prioritize quality and freshness. Our platform facilitates direct
communication between customers and farmers, fostering transparency and trust in the supply
chain. Experience the convenience of online vegetable shopping like never before with
FreshGreens.
CONTENTS
1 INTRODUCTION
2 SYSTEM STUDY
3
3.1 FILE DESIGN
3.2 INPUT DESIGN
3.3 OUTPUT DESIGN
3.4 CODE DESIGN
3.5 DATABASE DESIGN
3.6 SYSTEM DEVELOPMENT
3.6.1 DISCRIPTION OF MODULES
CHAPTER I
Introduction:
In the bustling world of online commerce, GreenCart emerges as a beacon of
convenience, quality, and responsiveness. Our platform is dedicated to providing an
unparalleled shopping experience for customers seeking the freshest vegetables, while also
incorporating robust features for secure login and seamless order management.
Built using HTML, CSS, and JavaScript, our website is not just visually appealing but
also highly responsive, ensuring optimal performance across various devices. Whether
you're browsing from a desktop, tablet, or smartphone, GreenCart adapts effortlessly to
your screen size, guaranteeing a smooth and intuitive user experience.
But GreenCart isn't just about aesthetics and responsiveness. We understand the
importance of security and user privacy, which is why we've integrated a PHP-based login
page. With secure authentication mechanisms, log in securely, and manage their profiles
with confidence.
• RAM : 1GB
• Front-end : HTML&CSS
• Back-end : MY SQLE&PHP
CHAPTER II
SYSTEM STUDY
2.0. SYSTEM STUDY
2.1.1. Drawbacks
Poor User Experience (UX): Non-responsive websites don't adapt to different screen sizes
and devices. This leads to a poor user experience, especially on mobile devices where more
and more users are browsing. Users may find it difficult to navigate the site, view products,
and complete purchases, resulting in frustration and abandonment of the site.
Decreased Visibility: Search engines like Google prioritize mobilefriendly websites in their
search results. A website that is not responsive may rank lower in search engine results pages
(SERPs), reducing its visibility to potential customers.
Lost Sales Opportunities: With an increasing number of people using mobile devices for
online shopping, a non-responsive website misses out on potential sales opportunities.
Customers may leave the site if they cannot easily browse and purchase products on their
mobile devices.
Negative Brand Perception: A website that does not adapt to different devices reflects poorly
on the brand. Users may perceive the brand as outdated or unprofessional, damaging its
reputation and credibility.
Competitive Disadvantage: In today's competitive market, having a responsive website is
essential to staying ahead of competitors. Businesses with responsive websites are better
positioned to attract and retain customers who prefer shopping on mobile devices.
Higher Maintenance Costs: Maintaining separate websites for desktop and mobile users can
be more expensive and time-consuming than having a single responsive website. Non-
responsive websites may require ongoing adjustments and fixes to accommodate various
screen sizes and devices.
2.2.1. Description
2.2.2 Features
•
Control redundancy
•
Ease of use
•
Data independence
•
Accuracy and integrity
•
Avoiding inordinate delays
•
Recovery form failure
•
Privacy and security
•
Performance
1. Design Phase:
2. Frontend Development:
3. Backend Development:
• Set up a server environment with PHP support (e.g., Apache or Nginx with
PHP-FPM).
• Write PHP scripts to handle server-side logic, such as processing form
submissions, interacting with databases, and generating dynamic content.
• Connect to a database using PHP's database extensions or an ORM
(Object- Relational Mapping) library like PDO or Doctrine.
• Implement security measures, such as input validation, sanitization, and
protection against SQL injection and XSS (Cross-Site Scripting) attacks.
4. Database Development:
• Create the necessary database tables and relationships based on the previously
designed schema.
• Implement CRUD (Create, Read, Update, Delete) operations using SQL
queries or ORM methods.
• Integrate the frontend and backend components to ensure they work together
seamlessly.
• Test the system thoroughly, including unit testing for individual components
and integration testing for the system as a whole.
• Perform usability testing to ensure the system meets the needs of its intended
users.
• Identify and fix any bugs or issues that arise during testing.
6. Deployment:
• Regularly maintain and update the system to address bugs, security vulnerabilities,
and feature enhancements.
• Monitor server performance and scalability to accommodate growing user demands.
• Gather feedback from users to identify areas for improvement and prioritize future
development efforts accordingly.
3.6.1 DISCRIPTION OF MODULES
Modules List:
Home
Login
Products
Order Product
Services Contact
Home :
Login :
Products :
Order product :
Services :
Detaile Informations about the website and the products.
Contact :
Testing and implementing a vegetable selling website involve several steps to ensure
the functionality, reliability, and security of the system. Below are key phases for testing and
implementation:
Testing:
Unit Testing:
Integration Testing:
Functional Testing:
Verify that the system meets the specified functional requirements. Test
different use cases, including user login, product viewing, and product ordering
details.
Ensure that the user interface is intuitive and user-friendly. Verify that all UI
elements are responsive and functional.
Performance Testing:
Test the system's performance under various conditions (e.g., high load).
check response times for critical operations.
Security Testing:
Assess the system's security measures to protect patient data. Test for
vulnerabilities and implement measures to secure the system.
Usability Testing:
Conduct usability tests to ensure the system is easy to use for users. Gather feedback on
the user experience.
Compatibility Testing:
Ensure the system works correctly on different browsers and devices. Verify
compatibility with various operating systems.
Regression Testing:
Implementation:
Database Setup:
Create and configure the database for storing order data. Implement data
models to represent product name,quantity, and other relevant information.
Backend Development:
Implement server-side logic for handling user login,product ordering, and other
operations. Connect the backend to the database.
Frontend Development:
Develop the user interface for users. Ensure a responsive design that works
well on various devices.
Integration:
Integrate the frontend and backend components. Verify that data is correctly
transferred between the user interface and the server.
Security Implementation:
Deployment:
Deploy the system to a staging environment for final testing. Once satisfied,
deploy to the production environment.
Gather feedback from users and stakeholders. Iterate on the system based on
feedback and continuously improve it.
CONCLUTION:
Future Enhancement
Mobile App Development: Create a mobile application for the website to enhance
user accessibility and convenience. This app could include features such as push
notifications for deals, order tracking, and a user-friendly interface optimized for
smaller screens.
Personalized Recommendations: Implement a recommendation system based on
user preferences, purchase history, and browsing behavior. This can enhance the user
experience and encourage repeat purchases.
Subscription Service: Offer a subscription service where users can sign up to receive
regular deliveries of fresh vegetables. Allow them to customize their subscriptions
based on their preferences and dietary needs.
Recipe Suggestions: Integrate recipe suggestions based on the vegetables available
for sale. This feature could include meal planning options and shopping lists to make
it easier for customers to plan their meals.
Community Features: Create a community platform where users can share recipes,
cooking tips, and experiences related to vegetables. This can foster engagement and
create a sense of belonging among customers.
CHAPTER VI
BIBLIOGRAPHY
6.0. BIBLIOGRAPHY
• Duckett, Jon. "HTML and CSS: Design and Build Websites." Wiley, 2011.
• Flanagan, David. "JavaScript: The Definitive Guide." O'Reilly Media, 2020
• W3Schools. https://www.w3schools.com/
• Provides tutorials and references for HTML, CSS, JavaScript, and PHP.
WEBSITE
1. www.geeksforgeeks.org
2. www.w3schools.com
CHAPTER VII
APPENDENCIES
DFD INTRODUCTION
DFD is the abbreviation for Data Flow Diagram. The flow of data of a system or a
process is represented by DFD. It also gives insight into the inputs and outputs of each entity
and the process itself. DFD does not have control flow and no loops or decision rules are
present. Specific operations depending on the type of data can be explained by a flowchart.
Data Flow Diagram can be represented in several ways. The DFD belongs to
structuredanalysis modeling tools. Data Flow diagrams are extremely popular because they
help us to visualize the major steps and data involved in software- system processes.
1. process
2. Data Flow
3. Warehouse
The data is stored in the warehouse for later use. Two horizontal lines
represent the symbol of the store. The warehouse is simply not restricted to being
a
data file, rather it can be anything like a folder with documents, an optical disc, a
filing cabinet. The data warehouse can be viewed independent of its
implementation. When the data flows from the warehouse it is considered as data
reading and when data flows to the warehouse it is called data entry or data
updating.
4. Terminator
The Terminator is an external entity that stands outside of the system and
communicates with the system. It can be, for example, organizations like banks,
groups of people like customers or different departments of the same organization,
which is not a part of the model system and is an external entity. Modeled systems
also communicate with terminators.
Levels of DFD
Advantages of DFD
Disadvantages of DFD
13. At times DFD can confuse the programmers regarding the system.
14. Data Flow Diagram takes a long time to be generated, and many
times
due to this reasons analyst are denied permission to work on it.
DATA FLOW DIAGRAM
B. TABLE STRUCTURE
Designing a table structure for a vegetable selling website would involve creating
tables to store relevant information.
1. Login:
• Email
• Password
2. product:
• ProductName
• Quantity
3. Contact:
• Name
• Email
• Address
C. SAMPLE CODING
INDEX.PHP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>shop</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="font/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<nav class="nav">
<span>LOGO</span>
<button type="submit" class="signin-btn" onclick="openlogin()">Sign In</button>
<ul>
<li><a href="#home">HOME</a></li>
<li><a href="#product">PRODUCT</a></li>
<li><a href="#services">SERVICES</a></li>
<li><a href="#contact">CONTACT</a></li>
</ul>
<div class="hamb">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
</div>
</nav>
<!-- home-->
<section id="home">
<div class="login-container">
<form class="login-form" name="loginform" id="popup" action="log.php"
method="post"> <h2>Login</h2>
<div class="input-group">
<label for="username">UserName</label>
<input type="email" id="username" name="uname" required>
</div>
<div class="input-group">
<label for="password">Password</label>
<input type="password" id="password" name="upassword" required> </div>
<div class="button-group">
</form>
</div>
<script> document.querySelector('.login-form').addEventListener('submit',
function(event) {
event.preventDefault(); // Prevent default form submission
</section>
<!-- home-->
<!--product-->
<section id="product">
<div class="container">
<div class="products-preview">
<div class=" preview" data-target="tomato">
<i class="fas fa-times"></i>
<img src="1.png">
<h3>Organic Tomatos</h3>
<div class="stars">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star-half-alt"></i> <span>(250)</span>
</div>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Itaque, provident.</p>
<div class="quan">
<label for="quantity" name="Quantity">Quantity:</label>
<input type="number" class="qty" placeholder="In Kg">
</div>
<div class="price">$100.00</div>
<button type="order_button" id="btn_order" class="btn_order">Order Now</button>
</div>
@import url('https://fonts.googleapis.com/css2?
family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,
500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&displa
y=swap');
*{ margin: 0; font-family:
"Poppins", sans-serif;
textdecoration: none; list-style:
none; box-sizing: border-box;
userselect: none;
}
span{
color: aqua; font-
size: 30px;
paddingleft: 20px;
lineheight: 70px;
}
70px;
}
.nav ul li a{ color:
blue; padding: 0 15px;
font-size:
20px; transition:
300ms;
}
.signin-btn{ padding:
8px 25px;
background: #e5e5e5;
color: black; border:
none; border-radius:
4px; cursor: pointer;
align-items: center;
font-size: 15px;
border: none; outline:
none; border-radius:
20px; text-shadow:
2px 2px 4px
rgba(0,0,0,.2);
boxshadow: 15px 20px
20px rgba(0,0,0,.3),
inset 4px 4px 10px
white; letter-spacing:
1px; transition: .2s;
opacity: .8;
marginleft: 40px;
}
@media (max-width:768px){
.nav{ position: fixed; } .nav
ul{ position: fixed; left: 0; width: 100%;
height: 100vh; background-color:
rgba(128,128,128,0.8); text-align: center;
padding: 0; left: -
100%; transition: 1s;
.nav ul li a{ font-
size: 20px; color:
blue;
}
.nav ul
li{ display:
block; width:
100%;
margin: 0;
}
.nav ul.slide{
left: 0; transition:
1s;
}
.hamb{
float: right; paddingright:
20px; padding-top:
18px;
}
.line{ width:
15px; height:
5px;
background-
color: white;
display:
block;
marginbotto
m: 5px;
borderradius
: 10px; }
.hamb:hover{ cur
sor: pointer;
}
#home{
width: 100%; height: 100vh;
background-image: url("homebg.jpg");
background-size: cover; backgroundposition:
center; background-repeat:
no-repeat;
}
.login-form {
.open-popup{
visibility: visible; margin-top:
0; transform:
scale(1); }
.login-form h2
{ margin-top: 0;
textalign: center;
fontsize: 40px; color:
white; text-shadow:
2px 2px 4px
rgba(0,0,0,.2); letter-
spacing: 2.5px;
margin-bottom: 20px;
}
.input-group { marginbottom:
20px;
}
.button-group { textalign:
center;
}
#logcancel{ paddin
g: 8px 15px;
background: gray;
color: white; border:
none; cursor:
pointer; align-items:
center; font-size:
15px; border: none;
outline: none;
border-radius: 20px;
letter-spacing: 1px;
transition: .2s;
margin-left: 15px;
}
#logcancel:hover{ tr
ansform: scale(1.2);
transition: .2s;
#logbtn{ padding:
10px 25px;
background: gray;
color: white; border:
none; cursor: pointer;
align-items: center;
font-size: 15px;
border: none; outline:
none; border-radius:
20px; letter-spacing:
1px;
transition: .2s;
}
#logbtn:hover
{ transform:
scale(1.2);
transition: .2s; }
#product{ backgroun
d: #e5e5e5;
}
.container{ maxwidth:
1200px; margin: 0
auto; padding: 48px
32px;
}
.title{ margin-top: 50px; font-size:
56px; color:
#444; margin-bottom:
48px; text-transform: uppercase;
text-align:
center; }
.product
img{ height:
10rem; }
.product
h3{ fontfamily:
sans- serif; }
.preview img{
height:
14rem;
}
.products-preview{
position: fixed; top: 0;
left: 0; min-height:
100vh; width: 100%;
background: rgba(0,0,0,.8);
display: none; align-items:
center; justify-content:
center;
}
.products-preview .preview{
display: none; padding:
2rem; margin: 2rem;
text-align: center;
background: #fff; position:
relative; width:
28rem; border-radius:
10px;
}
.products-preview .preview.active{ display:
inline-block;
}
.products-preview .preview .fa-times{ position: absolute; top: 1rem; right: 1.5rem;
cursor: pointer; color: #444; font-size: 2rem; transition: .2s; }
SCRIPT.JS
hamburger.addEventListener('click',
()=>{ navbar.classList.toggle('slide');
});
//products//
document.querySelectorAll('.product').forEach(product=>{ p
roduct.onclick= () =>{ previewContainer.style.display
='flex'; let name = product.getAttribute('data-name');
previewBox.forEach(preview=>{ let target =
preview.getAttribute('data-target'); if(name ==
target){ preview.classList.add('active');
}
});
};
});
previewBox.forEach(close=>{ close.querySelector('.fa-
times').onclick=() =>{
close.classList.remove('active'); previewContainer.style.display
='none';
};
});
//products//
// login popup //
// login popup //
LOHIN.PHP
<?php
$servername = "localhost"; // Change this if your database is hosted elsewhere
$username = "root"; // Your database username
$password = ""; // Your database password
$dbname = "vegetable_shop"; // Your database name
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$username = $_POST['uname'];
$password = $_POST['upassword'];
echo json_encode(array("status" => "error", "message" => "Error: " . $sql . "<br>" .
$conn->error));
}
$conn->close();
} else {
ORDERS.PHP
<?php
$servername = "localhost";
$username = "root";
$password = "";
$database = "vegetable_shop";
// create connection
$conn = new mysqli($servername, $username, $password, $database);
<?php
$stmt->close();
$conn->close();
} else { echo "Error: Data not received";
} ?>
D.SAMPLE INPUT
E.SAMPLE OUTUT