Code Monkey home page Code Monkey logo

e-commerce-php's Introduction

E-Commerce-PHP

To advance study of the upcoming project in EIT PHP E-Commerce
Project Features - Title: PHP - Ecommerce

Features

  • Buyers
    • Add to cart as many as they want
    • Cart Functions (Add, Decrease, Remove and View)
    • Checkout all in the cart
    • Transaction Functions (Cancel the Product if status is "Pending Order")
    • Change their password and details
  • SELLERS
    • Add many as products as they want
    • Edit and Delete a Product
    • Pack the item in transaction page
    • Change their details and password
  • ADMIN
    • View all the list of Sellers and Buyers
    • Remove Buyer and Seller Account (same as their products and carts)
    • See all the transactions
    • Update the status to "Shipped" and "Delivered"


Languages to be used PHP, Javascript and Bootstrap for designs

How to Install

1. First run the xampp application (apache and mysql)
2. Go to `localhost/phpmyadmin/` [here](localhost/phpmyadmin)
3. Create database called **e-commerce-php** (all lower case)
4. Download the source code and extract
5. In the database import the sql file in **e-commerce-php** database
6. Put the extracted source code in the `htdocs folder` 
7. And simply type localhost/E-Commerce-PHP/index.php

e-commerce-php's People

Contributors

cskiller24 avatar

Watchers

 avatar

Forkers

hapon27

e-commerce-php's Issues

Admin Homepage UI

This includes;

  • List Seller Name
  • Delete Seller Button
  • View Seller Information (Products Details)

Header UI

I recommend header should be separated to the whole website to prevent copy pasting of codes

  • Header for Buyers must include

  • Shop Name

  • Shop Brand

  • About Page

  • Drop Down List
    1. Order History of the Buyer
    2. Carts (Including number of Carts they add)
    3. Settings Button for Buyers
    4. Logout Button

  • Headers for Sellers must include

  • Brand and Name of the Shop

  • User Settings

  • Logout Button

  • Header for Admin

  • Brand and Name of the Shop

  • User Settings

  • Logout Button

NOTE: This can be done in separated files(buyerHeader.php, sellerHeader.php, adminHeader.php)

Homepage UI

  • Showing the list of Items
    - Name
    - Picture of the Product
    - Price
    - View Button
    - Add to cart button

SCRIPT: Cart System

When a buyer click "Add to Cart"

  • It automatically added in a buyer acount

  • It can be saved in database (Cart)

  • Add Cart (if already in cart table add amount + 1)

  • Remove Cart (In checkout system)

Product Details UI

By Clicking "VIEW" in Homepage UI you will be directed to the following

  • Product Image (Specific)
  • Product Name (Specific)
  • Category
  • Details
  • Add to Cart Button

NOTE: This should be automated as the buyer will automatically add a product for less work force in making the website one by one according to the number of products

SCRIPT: Transactions

There are separate transactions (3)

  • For the Sellers

    • Pull all the transactions in with a name of the seller.
    • Pull all the product amount and price of the transactions
    • Add an option when the seller packed the item.
    • Status will be inserted to the database
  • For the Buyers

    • The buyers will only view the transaction history
    • Can cancel the product when the seller hasn't packed the product
  • For the Admin

    • Admin can view all the transactions but it can't be deleted
    • If the status is packed, the admin can change the status to shipped to logistics
    • If the status is shipped the admin can also change status to delivered

List of Status

  • Pending Order
  • Packed
  • Shipped
  • Delivered

SCRIPT: Checkout System

  1. User choose an amount
  2. Calculates all the amount in the cart for checkout
  3. Selects the Option in Delivery
    • Cash on delivery
    • Cash Card
  4. Display Status
    • Packed
    • Shipped
    • Received
  5. Transactions are recorded
  6. Buyer have a received button
  7. Seller have a packed button
  8. Admin have a shipped button

Languages Using:

  • PHP <?php echo("Hello World!");?>
  • Javascript console.log("Hello World");
  • Bootstrap for designing

Mega Cleaning

This is to arrange the files according to the functions needed for more code readability and reduce redundancy

  • Main Functions
  • Seller Functions
  • Buyer Functions
  • Transaction Functions

Seller Specific Product UI

This includes:

  • Product Name (Text Box)
  • Product Details (Text Box)
  • Category (Text Box)
  • Price (Text Box)
  • Change Image (Text Box)

Previous information must be in the text box to have less work

SCRIPT: Login and Register UI

  • Login

  • PHP Check login userdata

  • Redirected to login and signup when accessing the homepage

  • Login for Admin (No register, username and password only)

  • Register

  • All of the text box are required <input type="text" required>

  • Password must be hashed when going to the database $_password = md5($_POST['password']);

  • Password confirmation

  • Does not register if it has duplicate email

  • Register for Seller

  • Same as the register for buyer

  • Login for Seller

  • Same as the login for buyer

UI: Specific Products

  • Buyer

    • Has Picture
    • Has Details
    • Has Add to Cart Button
  • Seller

    • Has Picture
    • Has Delete Product Button when clicking it will ask the password to confirm
    • Has Edit Button Will preview all the previous information to the inputs
  • Admin

    • Can only View the product by the seller Don't Delete
    • Has Picture
    • Has Details
    • Has Seller Name

SCRIPT: Header

Includes

  • Cart Button

  • Cart Button will add a number of carts
    image

  • Log out Button

UI: User settings

  • Buyer

    • Can change the information
    • Can change the password ENTER PASSWORD CURRENT AND NEW
  • Seller

    • Can change the information
    • Can change the password ENTER PASSWORD CURRENT AND NEW
  • Admin

    • Can change the password ENTER PASSWORD CURRENT AND NEW

SCRIPT: Change Password for Buyer, and Seller

  • In home page of both buyer and seller there will be settings tab where you can change password

  • Inputs

  1. Existing Password
  2. New Password
  3. Confirm Password
  • Alert Password changed
  • Redirects to the Login page to login again

SCRIPT: Logout

Script that redirects to login page
Removes saved information (auto redirect)

  • Script for login buyer
  • Script for login seller
  • Script for login admin

Database Setup

This database rows are the following:

For Buyers

  • Increment ID
  • User_ID (Automated)
  • Email
  • Contact Number
  • Name (First Name, MI and Surname Combined)
  • Password
  • Cart Systems
  • Registered Date

For Sellers

  • Increment ID
  • buyer_id (Automated)
  • Name (First Name, MI and Surname Combined)
  • Email
  • Contact Number
  • Password
  • Registered Date

Product

  • Increment ID
  • Product ID (Automated)
  • Product Name
  • Product Detail
  • Seller Name
  • Price
  • Amount
  • Image

Admin

  • Username
  • Password

Transactions Database

  • Incremented ID
  • Transaction ID
  • Product
  • Quantity
  • Price
  • Payment Method
  • Timestamp
  • Buyers ID or Name
  • Seller ID or Name

EDIT: Added transactions database

SCRIPT: Seller Edit Product

  • In product page it has a UI that click edit
  • Will show a pop-up for edit section
  • Seller remove the information that is already in textbox (previous information to edit)
  • Click EDIT will confirm and send a query to the database otherwise click X

Login, Register UI

  • Login
    • Email
    • Password
  • Register
    • Email
    • Contact Number
    • Name (First Name, MI and Surname Combined)
    • Password
    • Confirm Password
  • Register Buyer
    • Name (First Name, MI and Surname Combined)
    • Email
    • Contact Number
    • Password
  • Admin Login Access (No register)
    • Admin Username
    • Admin Password

SCRIPT: Transaction Functions

  • GET All transactions
  • GET SpecificTransactions (Buyer, $id)
  • GET SpecificTransactions (Seller, $seller)
  • UPDATE Status to Packed (Seller)
  • UPDATE Status to Shipped (Admin)
  • UPDATE Status to Delivered (Admin)
  • DELETE Transactions from the Database (Admin)

Admin Specific Seller Information

This Includes:

  • Seller List of Products
  • Quantity
  • Delete Button
  • Seller Delete Button

Note: When Deleting make sure it ask confirmation before proceeding as it doesn't have a way to regain it's details once it is deleted

SCRIPT: Login

Make a script that automatically redirects the login into the home page if the user has already logged in

if(userHasAlreadyLoggedIn){ redirect to store get all the data from database(name, email, password etc) }

SCRIPT: View Product Details in Store

User redirected to the View Page Product
Shows the following

  • Title (product_name)
  • Description (Product_detail)
  • Seller name
  • Price
  • Amount
  • Product Image

Has

  • Add to Cart Button
  • Continue Shopping Button

Final Phase

  • LOGIN Buyer
  • LOGIN Seller
  • LOGIN Admin
    =========================
  • REGISTER Buyer
  • REGISTER Seller
    =========================
  • HOMEPAGE Buyer
  • HOMEPAGE Seller
  • HOMEPAGE Admin
    =========================
  • TRANSACTIONS Buyer
  • TRANSACTIONS Seller
  • TRANSACTIONS Admin
    =========================
  • EDIT DETAILS Buyer
  • EDIT DETAILS Seller
    =========================
  • CHANGE PASSWORD Buyer
  • CHANGE PASSWORD Seller
  • CHANGE PASSWORD Admin
    =========================
  • VIEW PRODUCT Buyer
  • VIEW PRODUCT Seller
  • VIEW PRODUCT Admin Removed
    =========================
  • VIEW BUYER Admin
  • VIEW SELLER Admin
    =========================
  • ABOUT Buyer
  • ABOUT Seller
  • ABOUT Admin
    =========================
  • ADD-TO-CART Buyer
  • CHECKOUT Buyer
    =========================
  • DELETE PRODUCT Seller
  • EDIT PRODUCT Seller
    =========================
  • DELETE BUYER Admin
  • DELETE SELLER Admin
    =========================
  • PAGINATION Buyer Homepage

SCRIPT: Remove Product

Seller Section

  • Add delete UI in seller store
  • Clicking view will show a pop-up of the product
  • When the seller confirms they remove, they will type a their password for confirmation, otherwise click "X"

UI: Transactions

  • Buyer

    • Tables that show the transactions
    • Show Status
    • Actions: If the STATUS is ORDER PENDING then action can click CANCEL ORDER
  • Seller

    • Tables show the transactions of buyer in their product
    • Actions: If the STATUS is ORDER PENDING you can click PACKED
  • Admin

    • Table that shows all the transactions
    • Actions: If the STATUS is PACKED you can click SHIP NOW
    • Actions: If the STATUS is SHIPPED you can click RECEIVED

Seller Homepage UI

Includes:

  • Headers for Sellers

  • Buyers Products

    1. Delete Button
    2. Edit Button
    3. List Product Button
    4. Quantity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.