Kuldeep Bca 5 Project 2-1
Kuldeep Bca 5 Project 2-1
Kuldeep Bca 5 Project 2-1
A Project Report
on
“ONLINE INVENTORY SHOP”
Submitted in partial fulfillment of the requirements
for the award of the degree of Bachelor of Computer
Application (Hons.)
Submitted by:
Kuldeep Singh (B2192R10400030)
CERTIFICATE
This certify that the project report entitled “ONLINE INVENTORY SHOP” submitted by partial
fulfilment of the requirement for the degree of Bachelor of Computer Application (Hons.) in
July-Dec 2023-2024 AKS University, Satna is a bonafide project work carried out by Kuldeep
Singh, B2192R10400030, under my supervision. The subject of the project report has been approved
by supervisor. This is also to certify that it is his/her original work and no part of this project is report
has been submitted for any other degree/diploma.
All the assistance the and help received during the course of the investigation has been duly
acknowledged.
1. I am satisfied that the report presented by Kuldeep Singh is worthy of consideration for award
of the degree.
2. I certify:-
i) That he/she pursued the prescribed course of research.
I certify that the project report entitled “ONLINE INVENTORY SHOP” is my own work conducted
under the supervision of Prof. Akhilesh A. Waoo, (Supervisor), Head of Department CS/IT, AKS
University, Satna (M.P.) for partial fulfilment of the requirement for the degree in Bachelor of
I further certify that to the best of my knowledge and belief the project report does not contain any part
of this work which has been submitted for the award of any degree either in this university or in any
………………………… …………………………
External Signature Signature of Candidate
Kuldeep Singh
……………………………. ………………………………
SELF DECLARATION
I hereby declare that the work presented in this project entitled " ONLINE INVENTORY SHOP "
towards the partial fulfilment of the requirement for the award of Degree in BCA (Hons.) in
Department of Computer Science, AKS University, Satna (M.P.) is an authentic record of my own
work.
I have not submitted the matter embodied in the project for the award of any other degree or diploma
to any other institute or university.
BCA (Hons.)
ACKNOWLEDGEMENT
It is a great for me in taking this opportunity to express my sincere thanks and ineptness to Prof.
Akhilesh A. Waoo, Head of the Department of CS/IT, AKS University, Satna (M.P.)
I consider myself lucky enough to have such a great project. This project would add as an asset to my
profile.
At this moment of accomplishment, first of all I pay homage to my guide, Mrs. Shruti Gupta
(Assistant Professor) from AKS University Satna (M.P.). This work would not have been possible
without his guidance, support and encouragement. Under his guidance I successfully overcame many
difficulties and learned a lot.
I am deeply and forever indebted to my parents for their love, support and encouragement throughout
my entire life.
ABSTRACT
The Online Inventory Shop leverages cutting-edge technologies such as cloud computing, data analytics,
and artificial intelligence to offer real-time insights into stock levels, product trends, and customer
preferences. Retailers can optimize inventory turnover, minimize stockouts, and enhance overall
operational efficiency through intelligent forecasting and automated replenishment algorithms. The
platform also facilitates a user-friendly interface for easy navigation, empowering businesses of all sizes
to harness the benefits of digital inventory management.
Key features of the Online Inventory Shop include secure data storage, customizable reporting tools, and
multi-channel synchronization, ensuring a seamless connection between the virtual inventory and
physical store shelves. Additionally, the platform prioritizes data security and privacy, implementing
robust encryption measures to safeguard sensitive information.
This abstract encapsulates the transformative potential of the Online Inventory Shop in revolutionizing
the retail sector, fostering agility, and ensuring a competitive edge in an evolving market. As retailers
navigate the dynamic landscape of e-commerce, this solution presents a strategic tool to optimize
inventory processes, enhance customer satisfaction, and drive sustainable business growth.
TABLE OF CONTENT
• Introduction……...……………………………………………………………
• Definition of Problem……………………………………………………..
• System Configuration…..…………………………………………………
• Block Diagram…………………………………………………….……….…
• Flow Chart………………………………………………………………………
• DFD Diagram……………………………………………………………….....
• ER Diagram ……………………………………………………………………
• Database Screen………………………………………………………………
• Codding……….……………..………………………………………………....
• Conclusion………………………………………………………………………
INTRODUCTION
This introduction marks the advent of a groundbreaking solution poised to redefine how retailers
approach inventory management—the Online Inventory Shop. Unlike conventional methods, this
virtual marketplace transcends physical constraints, offering a comprehensive and intuitive platform
designed to revolutionize the way businesses handle their stock.
As we delve into the intricacies of the Online Inventory Shop, we will explore its transformative
features, cutting-edge technologies, and the profound impact it can have on the efficiency and
competitiveness of retail establishments. From real-time analytics and intelligent forecasting to
seamless integration with existing systems, this digital solution is positioned to empower retailers of
all sizes, facilitating a more agile and responsive approach to inventory control in the fast-paced
landscape of online commerce. Join us on this journey to uncover how the Online Inventory Shop is
set to usher in a new era of efficiency and innovation in the world of retail.
In the dynamic realm of contemporary commerce, the integration of technology has reshaped
traditional business paradigms, propelling the retail sector into an era defined by digital innovation.
As consumer behaviors continue to evolve and the demand for seamless shopping experiences rises,
retailers face the imperative to adapt and optimize their operations. One pivotal aspect of this
transformation lies in the management of inventory—an indispensable element that directly impacts
customer satisfaction, operational efficiency, and ultimately, the bottom line
Develop a centralized and easily accessible platform that streamlines inventory processes for
businesses of all sizes.
Simplify the tracking, monitoring, and management of stock levels to minimize manual errors and
enhance operational efficiency.
2. Real-Time Visibility:
Provide real-time visibility into inventory levels, product movements, and trends to enable data-
driven decision-making.
Implement advanced reporting and analytics tools for comprehensive insights into stock
performance.
Integrate intelligent forecasting algorithms to predict demand patterns and optimize inventory
levels.
Automate replenishment processes to prevent stockouts and overstock situations, improving overall
inventory turnover.
4. Multi-Channel Integration:
Facilitate seamless integration with various sales channels, including physical stores and online
platforms, ensuring synchronization of inventory data across all channels.
5 User-Friendly Interface:
Design an intuitive and user-friendly interface to enhance accessibility for users with varying levels
of technical expertise.
Prioritize ease of navigation, allowing users to effortlessly perform tasks such as adding products,
updating stock, and generating reports.
Implement robust security measures to safeguard sensitive inventory data, ensuring compliance
with data protection regulations.
Provide secure user authentication and authorization mechanisms to protect against unauthorized
access.
7. Cost Efficiency:
Help businesses reduce costs associated with overstocking, stockouts, and manual inventory
management processes.
Enable efficient resource allocation by optimizing stock levels and minimizing the need for
emergency restocking.
8. Scalability:
Build a scalable platform that can adapt to the evolving needs of growing businesses,
accommodating an increasing volume of products and transactions.
1. Inventory Management:
Implement a centralized platform to manage and monitor inventory levels across different products
and categories.
Allow users to add, edit, and remove products easily, with features for batch updates and bulk imports
Enable real-time tracking of stock movements, including sales, returns, and adjustments, providing
up-to-the-minute visibility into inventory status.
Integrate forecasting algorithms to predict demand based on historical data and market trends.
Automate replenishment processes to optimize stock levels and prevent both stockouts and overstock
situations.
5. Multi-Channel Integration:
Facilitate seamless integration with various sales channels, including online marketplaces, e-
commerce platforms, and physical stores.
Ensure synchronization of inventory data across all integrated channels to maintain consistency.
7. User-Friendly Interface:
Design an intuitive and user-friendly interface that caters to users with varying levels of technical
expertise. Prioritize ease of use and navigation to enhance user adoption.
Incorporate robust security measures to protect sensitive inventory data from unauthorized access
and cyber threats.
Ensure compliance with data protection regulations and industry standards.
9. Scalability:
Provide comprehensive customer support to assist users with any issues or queries.
Develop training materials and resources to facilitate user onboarding and ongoing education.
DEFINITION OF PROBLEM
The problem addressed by the Online Inventory Shop project lies in the inefficiencies and limitations
inherent in traditional inventory management systems, hindering the adaptability and
competitiveness of businesses in the evolving landscape of retail. The following key aspects define
the problem:
Conventional inventory management relies on manual data entry and tracking, leading to errors,
delays, and increased susceptibility to inaccuracies in stock levels.
Businesses often lack real-time visibility into their inventory, impeding the ability to respond
promptly to market trends, consumer demands, and changes in product popularity.
3. Ineffective Forecasting:
Without advanced forecasting tools, businesses struggle to predict demand accurately, resulting in
challenges such as stockouts, overstock situations, and suboptimal inventory turnover.
The absence of seamless integration between various sales channels, including physical stores and
online platforms, leads to discrepancies in inventory data and undermines a cohesive customer
experience.
5. Security Concerns:
Traditional systems may lack robust security measures, exposing sensitive inventory data to the risk
of unauthorized access, data breaches, and potential compromise of business-critical information.
6. Operational Inefficiencies:
Cumbersome workflows, manual processes, and the absence of automation contribute to operational
inefficiencies, hindering the agility and responsiveness of businesses in the face of changing market
dynamics.
7. Scalability Challenges:
Inaccurate inventory levels, stockouts, and delayed order fulfillment negatively impact customer
satisfaction, eroding brand trust and potentially leading to customer attrition.
The problem, therefore, is characterized by the urgent need for a modern, integrated, and
technologically advanced solution that can overcome these challenges, providing businesses with the
tools necessary to streamline inventory processes, enhance visibility, improve forecasting accuracy,
and ultimately elevate the overall efficiency and competitiveness of their inventory management
practices. The Online Inventory Shop project endeavors to address these critical issues and usher in
a new era of streamlined, data-driven inventory management for retailers.
MODULE
1. Real-Time Visibility:
Provides real-time tracking of stock movements, allowing businesses to monitor inventory levels and
changes as they occur.
Enables immediate responses to fluctuations in demand, reducing the risk of stockouts or overstock
situations.
4. User-Friendly Interface:
- Features an intuitive and user-friendly interface that facilitates efficient navigation and operation.
- Reduces the learning curve for users, enhancing overall usability and user satisfaction.
Allows businesses to customize the system to meet specific inventory management needs.
Provides flexibility in defining product attributes, categories, and inventory parameters for a tailored
solution.
Implements secure authentication mechanisms and access controls to protect sensitive inventory
data.Ensures data security through encryption and adherence to industry-standard security practices.
7. Streamlined Workflows:
Streamlines inventory-related workflows, reducing manual efforts and minimizing the potential for
human errors.
Improves overall operational efficiency by automating routine tasks associated with inventory
management.
Integrates reporting and analytics tools, offering insights into inventory performance, demand trends,
and stock turnover.
Supports data-driven decision-making by providing a comprehensive view of key metrics and
performance indicators.
9. Scalability:
Designed to scale with the growing needs of the business, accommodating an increasing volume of
products, transactions, and data.
Ensures that the system remains effective and responsive as the business expands.
In summary, the Inventory Management Module within the Online Inventory Shop project brings a
host of benefits, ranging from real-time visibility and efficient product management to enhanced
security, scalability, and cost reduction. These advantages collectively contribute to a more
streamlined and effective inventory management process for businesses in the retail sector.
The choice of programming languages and technologies for the implementation of the Online
Inventory Shop project can depend on various factors, including the specific requirements of the
project, the development team's expertise, and the scalability goals. Here's a general outline of the
technologies commonly used in web-based projects like an online inventory management system:
1. Frontend Development:
2. Backend Development:
**Server-Side Language (e.g., PHP, Python, Ruby, Node.js):** To handle server-side logic and
communicate with the database.
**Framework (e.g., Laravel for PHP, Django for Python, Express for Node.js):** Provides a
structured way to build and organize the backend code.
3. Database:
**Database Management System (e.g., MySQL, PostgreSQL, MongoDB):** To store and retrieve
data efficiently.
**Query Language (e.g., SQL for relational databases, MongoDB query language for NoSQL
databases):** Used to interact with the database.
4. Backend APIs:
**RESTful APIs or GraphQL:** For communication between the frontend and backend
**JWT (JSON Web Tokens), OAuth:** For securing user authentication and managing access
control.
6. Version Control:
6. Web Servers:
**AWS, Azure, Google Cloud:** For hosting, scaling, and managing resources in the cloud.
9. Security Measures:
11. Testing:
Unit Testing, Integration Testing:** Ensuring the reliability and functionality of different
components.
11. Documentation:
The specific technologies and languages chosen can vary based on the development team's
expertise, project requirements, and any existing systems the Online Inventory Shop needs to
integrate with. This is a general overview, and the actual implementation may involve additional
tools and considerations based on the project's unique needs.
SYSTEM CONFIGURATION
Hardware Requirement
Software Requirement
BLOCK DIAGRAM
FLOW CHART
DFD DIAGRAM
ER DIAGRAM
DATABASE SCREEN
OUTPUT SCREEN
CODDING
PHP-FILE
HOMEACTION.PHP
<?php
session_start();
$ip_add = getenv("REMOTE_ADDR");
include "db.php";
if(isset($_POST["categoryhome"])){
$category_query = "SELECT * FROM categories WHERE cat_id!=1";
";
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$cid = $row["cat_id"];
$cat_name = $row["cat_title"];
echo "</ul>
<!-- /NAV -->
</div>
<!-- /responsive-nav -->
";
}
}
if(isset($_POST["page"])){
$sql = "SELECT * FROM products";
$run_query = mysqli_query($con,$sql);
$count = mysqli_num_rows($run_query);
$pageno = ceil($count/2);
for($i=1;$i<=$pageno;$i++){
echo "
<li><a href='#product-row' page='$i' id='page'>$i</a></li>
";
}
}
if(isset($_POST["getProducthome"])){
$limit = 3;
if(isset($_POST["setPage"])){
$pageno = $_POST["pageNumber"];
$start = ($pageno * $limit) - $limit;
}else{
$start = 0;
}
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id LIMIT
$start,$limit";
$run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
$pro_dis=$row['product_discount'];
$cat_name = $row["cat_title"];
echo "
<div class='product-widget'>
<a href='product.php?p=$pro_id'>
<div class='product-img'>
<img src='product_images/$pro_image' alt=''>
</div>
Kuldeep Singh (B2192R10400030) 36 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
<div class='product-body'>
<p class='product-category'>$cat_name</p>
<h3 class='product-name'><a href='product.php?p=$pro_id'>$pro_title</a></h3>
<h4 class='product-price'>RM $pro_price<del class='product-old-price'>RM $pro_dis</del></h4>
</div></a>
</div>
";
}
}
}
if(isset($_POST["gethomeProduct"])){
$limit = 9;
if(isset($_POST["setPage"])){
$pageno = $_POST["pageNumber"];
$start = ($pageno * $limit) - $limit;
}else{
$start = 0;
}
while($row = mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
$pro_dis=$row['product_discount'];
$cat_name = $row["cat_title"];
echo "
<span class='new'>NEW</span>
</div>
</div></a>
<div class='product-body'>
<p class='product-category'>$cat_name</p>
<h3 class='product-name header-cart-item-name'><a
href='product.php?p=$pro_id'>$pro_title</a></h3>
<h4 class='product-price header-cart-item-info'>RM $pro_price<del class='product-old-price'>RM
$pro_dis</del></h4>
</div>
<div class='add-to-cart'>
<button pid='$pro_id' id='product' class='add-to-cart-btn block2-btn-towishlist' href='#'><i class='fa
fa-shopping-cart'></i> add to cart</button>
</div>
</div>
</div>
";
}
;
if(isset($_POST["get_seleted_Category"]) || isset($_POST["search"])){
if(isset($_POST["get_seleted_Category"])){
$id = $_POST["cat_id"];
$sql = "SELECT * FROM products,categories WHERE product_cat = '$id' AND
product_cat=cat_id";
}else {
$keyword = $_POST["keyword"];
$sql = "SELECT * FROM products,categories WHERE product_cat=cat_id AND
product_keywords LIKE '%$keyword%'";
}
$run_query = mysqli_query($con,$sql);
while($row=mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
Kuldeep Singh (B2192R10400030) 38 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
$pro_dis=$row['product_discount'];
$cat_name = $row["cat_title"];
echo "
</div>
<div class='add-to-cart'>
<button pid='$pro_id' id='product' href='#' tabindex='0' class='add-to-cart-btn'><i class='fa fa-
shopping-cart'></i> add to cart</button>
</div>
</div>
</div>
";
}
}
ADMINLOGIN.PHP
<?php
#this is Login form page , if user is already logged in then we will not allow user to access this page
by executing isset($_SESSION["uid"])
#if below statment return true then we will send user to their profile.php page
//in action.php page if user click on "ready to checkout" button that time we will pass data in a form
from action.php page
if (isset($_POST["login_user_with_product"])) {
//this is product list array
$product_list = $_POST["product_id"];
//here we are converting array into json format because array cannot be store in cookie
$json_e = json_encode($product_list);
//here we are creating cookie and name of cookie is product_list
setcookie("product_list",$json_e,strtotime("+1 day"),"/","","",TRUE);
}
?>
</div>
<input class="primary-btn btn-block" type="submit" Value="Login">
<div class="panel-footer">
<div class="alert alert-danger">
<h4 id="e_msg"></h4>
</div>
</div>
<div><a href="adminlogin.php">userlogin</a></div>
</div>
</form>
</div>
</div>
ACTION.PHP
<?php
session_start();
$ip_add = getenv("REMOTE_ADDR");
include "db.php";
if(isset($_POST["category"])){
$category_query = "SELECT * FROM categories";
<div class='aside'>
<h3 class='aside-title'>Categories</h3>
<div class='btn-group-vertical'>
";
if(mysqli_num_rows($run_query) > 0){
$i=1;
while($row = mysqli_fetch_array($run_query)){
$cid = $row["cat_id"];
$cat_name = $row["cat_title"];
$sql = "SELECT COUNT(*) AS count_items FROM products WHERE product_cat=$i";
$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
$count=$row["count_items"];
$i++;
echo "
<a href='#'>
<span ></span>
$cat_name
<small class='qty'>($count)</small>
</a>
</div>
";
echo "</div>";
}
}
if(isset($_POST["brand"])){
$brand_query = "SELECT * FROM brands";
$run_query = mysqli_query($con,$brand_query);
echo "
<div class='aside'>
<h3 class='aside-title'>Brand</h3>
<div class='btn-group-vertical'>
";
if(mysqli_num_rows($run_query) > 0){
$i=1;
while($row = mysqli_fetch_array($run_query)){
$bid = $row["brand_id"];
$brand_name = $row["brand_title"];
$sql = "SELECT COUNT(*) AS count_items FROM products WHERE product_brand=$i";
$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
$count=$row["count_items"];
$i++;
echo "
<a href='#'>
<span ></span>
$brand_name
<small >($count)</small>
</a>
</div>
";
}
echo "</div>";
}
}
if(isset($_POST["page"])){
$sql = "SELECT * FROM products";
$run_query = mysqli_query($con,$sql);
$count = mysqli_num_rows($run_query);
$pageno = ceil($count/9);
for($i=1;$i<=$pageno;$i++){
echo "
<li><a href='#product-row' page='$i' id='page' class='active'>$i</a></li>
";
}
}
if(isset($_POST["getProduct"])){
$limit = 9;
if(isset($_POST["setPage"])){
$pageno = $_POST["pageNumber"];
$start = ($pageno * $limit) - $limit;
}else{
$start = 0;
}
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id LIMIT
$start,$limit";
$run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
$pro_dis=$row['product_discount'];
$cat_name = $row["cat_title"];
echo "
</div>
<div class='add-to-cart'>
Kuldeep Singh (B2192R10400030) 44 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
";
}
}
}
if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) ||
isset($_POST["search"])){
if(isset($_POST["get_seleted_Category"])){
$id = $_POST["cat_id"];
$sql = "SELECT * FROM products,categories WHERE product_cat = '$id' AND
product_cat=cat_id";
}else if(isset($_POST["selectBrand"])){
$id = $_POST["brand_id"];
$sql = "SELECT * FROM products,categories WHERE product_brand = '$id' AND
product_cat=cat_id";
}else {
$keyword = $_POST["keyword"];
header('Location:store.php');
$sql = "SELECT * FROM products,categories WHERE product_cat=cat_id AND
product_keywords LIKE '%$keyword%'";
$run_query = mysqli_query($con,$sql);
while($row=mysqli_fetch_array($run_query)){
$pro_id = $row['product_id'];
$pro_cat = $row['product_cat'];
$pro_brand = $row['product_brand'];
$pro_title = $row['product_title'];
$pro_price = $row['product_price'];
$pro_image = $row['product_image'];
$pro_dis=$row['product_discount'];
$cat_name = $row["cat_title"];
echo "
<div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
<div class='product-label'>
<span class='sale'>-30%</span>
<span class='new'>NEW</span>
</div>
</div></a>
<div class='product-body'>
<p class='product-category'>$cat_name</p>
<h3 class='product-name header-cart-item-name'><a
href='product.php?p=$pro_id'>$pro_title</a></h3>
<h4 class='product-price header-cart-item-info'>$pro_price<del class='product-old-price'>RM
$pro_dis</del></h4>
</div>
<div class='add-to-cart'>
<button pid='$pro_id' id='product' href='#' tabindex='0' class='add-to-cart-btn'><i class='fa fa-
shopping-cart'></i> add to cart</button>
</div>
</div>
</div>
";
}
}
if(isset($_POST["addToCart"])){
$p_id = $_POST["proId"];
if(isset($_SESSION["uid"])){
$user_id = $_SESSION["uid"];
$sql = "SELECT * FROM cart WHERE p_id = '$p_id' AND user_id = '$user_id'";
$run_query = mysqli_query($con,$sql);
$count = mysqli_num_rows($run_query);
if($count > 0){
echo "
<div class='alert alert-warning'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Product is already added into the cart Continue Shopping..!</b>
</div>
";//not in video
Kuldeep Singh (B2192R10400030) 46 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
} else {
$sql = "INSERT INTO `cart`
(`p_id`, `ip_add`, `user_id`, `qty`)
VALUES ('$p_id','$ip_add','$user_id','1')";
if(mysqli_query($con,$sql)){
echo "
<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Product is Added..!</b>
</div>
";
}
}
}else{
$sql = "SELECT id FROM cart WHERE ip_add = '$ip_add' AND p_id = '$p_id' AND user_id = -
1";
$query = mysqli_query($con,$sql);
if (mysqli_num_rows($query) > 0) {
echo "
<div class='alert alert-warning'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Product is already added into the cart Continue Shopping..!</b>
</div>";
exit();
}
$sql = "INSERT INTO `cart`
(`p_id`, `ip_add`, `user_id`, `qty`)
VALUES ('$p_id','$ip_add','-1','1')";
if (mysqli_query($con,$sql)) {
echo "
<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Your product is Added Successfully..!</b>
</div>
";
exit();
}
//When user is logged in then we will count number of item in cart by using user session id
if (isset($_SESSION["uid"])) {
$sql = "SELECT COUNT(*) AS count_item FROM cart WHERE user_id = $_SESSION[uid]";
}else{
//When user is not logged in then we will count number of item in cart by using users unique ip
address
$sql = "SELECT COUNT(*) AS count_item FROM cart WHERE ip_add = '$ip_add' AND user_id
< 0";
}
$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
echo $row["count_item"];
exit();
}
//Count User cart item
if (isset($_SESSION["uid"])) {
//When user is logged in this query will execute
$sql = "SELECT a.product_id,a.product_title,a.product_price,a.product_image,b.id,b.qty FROM
products a,cart b WHERE a.product_id=b.p_id AND b.user_id='$_SESSION[uid]'";
}else{
//When user is not logged in this query will execute
$sql = "SELECT a.product_id,a.product_title,a.product_price,a.product_image,b.id,b.qty FROM
products a,cart b WHERE a.product_id=b.p_id AND b.ip_add='$ip_add' AND b.user_id < 0";
}
$query = mysqli_query($con,$sql);
if (isset($_POST["getCartItem"])) {
//display cart item in dropdown menu
if (mysqli_num_rows($query) > 0) {
$n=0;
$total_price=0;
while ($row=mysqli_fetch_array($query)) {
$n++;
$product_id = $row["product_id"];
$product_title = $row["product_title"];
$product_price = $row["product_price"];
$product_image = $row["product_image"];
$cart_item_id = $row["id"];
$qty = $row["qty"];
$total_price=$total_price+$product_price;
echo '
<div class="product-widget">
<div class="product-img">
<img src="product_images/'.$product_image.'" alt="">
</div>
<div class="product-body">
<h3 class="product-name"><a href="#">'.$product_title.'</a></h3>
<h4 class="product-price"><span class="qty">'.$n.'</span>RM '.$product_price.'</h4>
</div>
</div>'
<?php
exit();
}
}
if (isset($_POST["checkOutDetails"])) {
if (mysqli_num_rows($query) > 0) {
//display user cart item with "Ready to checkout" button if user is not login
echo '<div class="main ">
<div class="table-responsive">
<form method="post" action="login_form.php">
</tr>
</thead>
<tbody>
';
$n=0;
while ($row=mysqli_fetch_array($query)) {
$n++;
$product_id = $row["product_id"];
$product_title = $row["product_title"];
$product_price = $row["product_price"];
$product_image = $row["product_image"];
$cart_item_id = $row["id"];
$qty = $row["qty"];
echo
'
<tr>
<td data-th="Product" >
<div class="row">
</div>
</td>
<input type="hidden" name="product_id[]" value="'.$product_id.'"/>
<input type="hidden" name="" value="'.$cart_item_id.'"/>
<td data-th="Price"><input type="text" class="form-control price" value="'.$product_price.'"
readonly="readonly"></td>
<td data-th="Quantity" class="text-center">
<input type="text" class="form-control qty" value="'.$qty.'" readonly="readonly">
</td>
<td data-th="Subtotal" class="text-center">
<input type="text" class="form-control total" value="'.$product_price.'" readonly="readonly">
</td>
<td class="actions" data-th="">
Kuldeep Singh (B2192R10400030) 50 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
<div class="btn-group">
<a href="#" class="btn btn-info btn-sm update" update_id="'.$product_id.'"><i class="fa fa-
refresh"></i></a>
';
}
echo '</tbody>
<tfoot>
<tr>
<td><a href="store.php" class="btn btn-warning"><i class="fa fa-angle-left"></i> Continue
Shopping</a></td>
<td colspan="2" class="hidden-xs"></td>
<td class="hidden-xs text-center"><b class="net_total" ></b></td>
<div id="issessionset"></div>
<td>
';
if (!isset($_SESSION["uid"])) {
echo '
</table></div></div>';
}else if(isset($_SESSION["uid"])){
//Paypal checkout form
echo '
</form>
$x=0;
echo
'<input type="hidden" name="return"
value="http://localhost/myfiles/public_html/payment_success.php"/>
<input type="hidden" name="notify_url"
value="http://localhost/myfiles/public_html/payment_success.php">
<input type="hidden" name="cancel_return"
value="http://localhost/myfiles/public_html/cancel.php"/>
<input type="hidden" name="currency_code" value="MYR"/>
<input type="hidden" name="custom" value="'.$_SESSION["uid"].'"/>
<input type="submit" id="submit" name="login_user_with_product" name="submit" class="btn
btn-success" value="Ready to Checkout">
</form></td>
</tr>
</tfoot>
</table></div></div>
';
}
}
}
}
if(mysqli_query($con,$sql)){
echo "<div class='alert alert-danger'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Product is removed from cart</b>
</div>";
exit();
}
}
?>
C.SS(MAIN)
/*//////////////////////////////////////////////////////////////////
[ FONT ]*/
@font-face {
font-family: Poppins-Regular;
src: url('../fonts/poppins/Poppins-Regular.ttf');
}
@font-face {
font-family: Poppins-Medium;
src: url('../fonts/poppins/Poppins-Medium.ttf');
}
@font-face {
font-family: Poppins-Bold;
src: url('../fonts/poppins/Poppins-Bold.ttf');
}
@font-face {
font-family: Poppins-SemiBold;
src: url('../fonts/poppins/Poppins-SemiBold.ttf');
}
/*//////////////////////////////////////////////////////////////////
[ RESTYLE TAG ]*/
*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body, html {
height: 100%;
font-family: Poppins-Regular, sans-serif;
}
/*---------------------------------------------*/
a{
Kuldeep Singh (B2192R10400030) 54 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
margin: 0px;
transition: all 0.4s;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
}
a:focus {
outline: none !important;
}
a:hover {
text-decoration: none;
color: #6a7dfe;
color: -webkit-linear-gradient(left, #21d4fd, #b721ff);
color: -o-linear-gradient(left, #21d4fd, #b721ff);
color: -moz-linear-gradient(left, #21d4fd, #b721ff);
color: linear-gradient(left, #21d4fd, #b721ff);
}
/*---------------------------------------------*/
h1,h2,h3,h4,h5,h6 {
margin: 0px;
}
p{
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
margin: 0px;
}
ul, li {
margin: 0px;
list-style-type: none;
}
/*---------------------------------------------*/
input {
outline: none;
border: none;
Kuldeep Singh (B2192R10400030) 55 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
textarea {
outline: none;
border: none;
}
textarea:focus, input:focus {
border-color: transparent !important;
}
input:focus::-webkit-input-placeholder { color:transparent; }
input:focus:-moz-placeholder { color:transparent; }
input:focus::-moz-placeholder { color:transparent; }
input:focus:-ms-input-placeholder { color:transparent; }
textarea:focus::-webkit-input-placeholder { color:transparent; }
textarea:focus:-moz-placeholder { color:transparent; }
textarea:focus::-moz-placeholder { color:transparent; }
textarea:focus:-ms-input-placeholder { color:transparent; }
/*---------------------------------------------*/
button {
outline: none !important;
border: none;
background: transparent;
}
button:hover {
cursor: pointer;
}
iframe {
border: none !important;
}
/*//////////////////////////////////////////////////////////////////
[ Utility ]*/
.txt1 {
font-family: Poppins-Regular;
font-size: 13px;
color: #666666;
line-height: 1.5;
}
.txt2 {
font-family: Poppins-Regular;
font-size: 13px;
color: #333333;
line-height: 1.5;
}
/*//////////////////////////////////////////////////////////////////
[ login ]*/
.limiter {
width: 100%;
margin: 0 auto;
}
.container-login100 {
width: 100%;
min-height: 100vh;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding: 15px;
background: #f2f2f2;
}
.wrap-login100 {
width: 390px;
background: #fff;
border-radius: 10px;
overflow: hidden;
padding: 77px 55px 33px 55px;
/*------------------------------------------------------------------
[ Form ]*/
.login100-form {
width: 100%;
}
.login100-form-title {
display: block;
font-family: Poppins-Bold;
font-size: 30px;
color: #333333;
line-height: 1.2;
text-align: center;
}
.login100-form-title i {
font-size: 60px;
}
/*------------------------------------------------------------------
[ Input ]*/
.wrap-input100 {
width: 100%;
position: relative;
border-bottom: 2px solid #adadad;
margin-bottom: 37px;
}
.input100 {
font-family: Poppins-Regular;
font-size: 15px;
color: #555555;
line-height: 1.2;
display: block;
width: 100%;
height: 45px;
background: transparent;
padding: 0 5px;
Kuldeep Singh (B2192R10400030) 58 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
/*---------------------------------------------*/
.focus-input100 {
position: absolute;
display: block;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
}
.focus-input100::before {
content: "";
display: block;
position: absolute;
bottom: -2px;
left: 0;
width: 0;
height: 2px;
background: #6a7dfe;
background: -webkit-linear-gradient(left, #21d4fd, #b721ff);
background: -o-linear-gradient(left, #21d4fd, #b721ff);
background: -moz-linear-gradient(left, #21d4fd, #b721ff);
background: linear-gradient(left, #21d4fd, #b721ff);
}
.focus-input100::after {
font-family: Poppins-Regular;
font-size: 15px;
color: #999999;
line-height: 1.2;
content: attr(data-placeholder);
display: block;
width: 100%;
position: absolute;
top: 16px;
left: 0px;
padding-left: 5px;
Kuldeep Singh (B2192R10400030) 59 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
.input100:focus + .focus-input100::after {
top: -15px;
}
.input100:focus + .focus-input100::before {
width: 100%;
}
.has-val.input100 + .focus-input100::after {
top: -15px;
}
.has-val.input100 + .focus-input100::before {
width: 100%;
}
/*---------------------------------------------*/
.btn-show-pass {
font-size: 15px;
color: #999999;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
align-items: center;
position: absolute;
height: 100%;
top: 0;
right: 0;
padding-right: 5px;
cursor: pointer;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
}
.btn-show-pass:hover {
Kuldeep Singh (B2192R10400030) 60 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
color: #6a7dfe;
color: -webkit-linear-gradient(left, #21d4fd, #b721ff);
color: -o-linear-gradient(left, #21d4fd, #b721ff);
color: -moz-linear-gradient(left, #21d4fd, #b721ff);
color: linear-gradient(left, #21d4fd, #b721ff);
}
.btn-show-pass.active {
color: #6a7dfe;
color: -webkit-linear-gradient(left, #21d4fd, #b721ff);
color: -o-linear-gradient(left, #21d4fd, #b721ff);
color: -moz-linear-gradient(left, #21d4fd, #b721ff);
color: linear-gradient(left, #21d4fd, #b721ff);
}
/*------------------------------------------------------------------
[ Button ]*/
.container-login100-form-btn {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-top: 13px;
}
.wrap-login100-form-btn {
width: 100%;
display: block;
position: relative;
z-index: 1;
border-radius: 25px;
overflow: hidden;
margin: 0 auto;
}
.login100-form-bgbtn {
position: absolute;
z-index: -1;
width: 300%;
height: 100%;
background: #a64bf4;
background: -webkit-linear-gradient(right, #21d4fd, #b721ff, #21d4fd, #b721ff);
Kuldeep Singh (B2192R10400030) 61 ONLINE INVENTORY SHOP
AKS UNIVESITY DEPARTMENT OF COMPUTER SCIENCE
.login100-form-btn {
font-family: Poppins-Medium;
font-size: 15px;
color: #fff;
line-height: 1.2;
text-transform: uppercase;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
justify-content: center;
align-items: center;
padding: 0 20px;
width: 100%;
height: 50px;
}
.wrap-login100-form-btn:hover .login100-form-bgbtn {
left: 0;
}
/*------------------------------------------------------------------
[ Responsive ]*/
.validate-input {
position: relative;
}
.alert-validate::before {
content: attr(data-validate);
position: absolute;
max-width: 70%;
background-color: #fff;
border: 1px solid #c80000;
border-radius: 2px;
padding: 4px 25px 4px 10px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 0px;
pointer-events: none;
font-family: Poppins-Regular;
color: #c80000;
font-size: 13px;
line-height: 1.4;
text-align: left;
visibility: hidden;
opacity: 0;
.alert-validate::after {
content: "\f06a";
font-family: FontAwesome;
font-size: 16px;
color: #c80000;
SOFTWARE TESTING
It looks like you're interested in software testing for an online inventory and shipping report system.
Software testing is a crucial phase in the software development life cycle to ensure the quality and
reliability of the software. Testing an online inventory and shipping report system involves various
types of testing to cover different aspects of the software. Here are some testing types you might
consider:
1. **Functional Testing:**
2. **Performance Testing:**
- **Load Testing:** Evaluate the system's performance under expected load conditions.
- **Stress Testing:** Check how the system behaves under extreme conditions.
3. **Usability Testing:**
4. **Security Testing:**
- Ensure that the system is secure from unauthorized access and data breaches.
5. **Compatibility Testing:**
- Check if the system works on different browsers, devices, and operating systems.
6. **Regression Testing:**
- Ensure that new code changes do not negatively impact existing functionality.
8. **Automated Testing:**
- Implement automated tests to speed up the testing process, especially for repetitive tasks.
CONCLUSION
In conclusion, the testing process for an online inventory shop is vital to ensure the system's
reliability, security, and user satisfaction. Through a comprehensive approach that encompasses
various testing types, such as functional, performance, usability, security, compatibility, regression,
and user acceptance testing, you can systematically validate the different aspects of the software.
Specifically tailored tests for inventory management, order processing, reporting, user
authentication, authorization, and notification functionalities are crucial to guarantee the smooth
operation of the online inventory shop. Automation can enhance the efficiency of the testing process,
particularly for repetitive tasks, allowing for quicker feedback and identification of potential issues.
Detailed documentation of test cases, expected outcomes, and any identified issues is essential for
effective communication within the development team and for future reference. Collaboration
between testing teams, developers, and stakeholders is key to gaining a thorough understanding of
requirements and ensuring that testing aligns with business goals.
By implementing a robust testing strategy, an online inventory shop can achieve a high level of
quality, providing users with a seamless and secure shopping experience. Continuous testing
throughout the software development life cycle is crucial for early detection and resolution of issues,
leading to the successful deployment of a reliable and customer-friendly online inventory shop.
PPT HANDOUTS(COLOR)