Ecommerce Website Script in PHP

1 67,354

Hi Viewer in this post we are going to teach you How to Create Ecommerce Website Script in PHP.  Ecommerce Website simple and Complete PHP and MySQL based Script which help to launch ecommerce system. You may use this website to setup an online store for selling any types of products under many categories and sub categories. in this script we are providing a dashboard for who manage products, categories and order. Shopping cart is very important part of any online store, this is not only allow user to access list of items for final purchase but also calculate total amount of all products in cart area.

Feature

  • Home 
    • Here user find all the products.
  • Category Page
    • Here user find all of the product categories and shop any thing going to easy navigation.
  • About us Page
    • If any person know about company who visit this page to about to company.
  • Contact us Page
    • Sometimes a user will have to contact to get information about things,Then he leans contact page.
  • Shopping  Page
    • User can buy many thing frombmany categories on the shopping page.
  • Single Product Page
    • This page has details of every products.
  • Cart Page
    • if a user add many items into cart but he want to buy few thing then he update cart on the cart page.
  • Checkout
    • if a user wants to nay thing before click on checkout button to payment.
  • Admin Login
    • Here we provide a Admin login for administer to manage the Ecommerce Website.
  • Manage Products
    • Admin can do add products, edit products and permant any products.
  • Manage Categories
    • Admin can manage all the categories for the products.
  • Manage Orders
    • Admin can manage Orders.

Setup

Create Database

Open Phpmyadmin in your browser and create a database named “dbgadget” and click on SQL button after that copy the below code paste it..

-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 16, 2016 at 08:05 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `dbgadget`
--

-- --------------------------------------------------------

--
-- Table structure for table `cart`
--

CREATE TABLE IF NOT EXISTS `cart` (
`ID` int(11) NOT NULL,
  `Product` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `category`
--

CREATE TABLE IF NOT EXISTS `category` (
`id` int(11) NOT NULL,
  `title` varchar(50) NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`id`, `title`) VALUES
(1, 'Laptops'),
(5, 'Mouse'),
(6, 'Keyboard'),
(11, 'Memory'),
(12, 'Mobile'),
(13, 'Smartphone'),
(14, 'Books'),
(15, 'Jwellery'),
(16, 'Camera'),
(17, 'Bike');

-- --------------------------------------------------------

--
-- Table structure for table `order`
--

CREATE TABLE IF NOT EXISTS `order` (
`id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `contact` varchar(100) NOT NULL,
  `address` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `item` text NOT NULL,
  `amount` varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL,
  `dateOrdered` varchar(100) NOT NULL,
  `dateDelivered` varchar(100) NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `order`
--

INSERT INTO `order` (`id`, `name`, `contact`, `address`, `email`, `item`, `amount`, `status`, `dateOrdered`, `dateDelivered`) VALUES
(1, 'Jimmy Lomocso', '09465795229', '049, Maracas, Lahug, Cebu City', 'jimmy.lomocso@gmail.com', '(2) Product 101, (1) Product 101, ', '600', 'confirmed', '09/23/14', '10/04/14'),
(2, 'a a', '09465795229', '049, Maracas, Lahug, Cebu City', 'jimmy.lomocso@gmail.com', '(1) Product 202, ', '100', 'confirmed', '10/03/14', '10/04/14'),
(3, 'Jimmy Lomocso', '09465795229', '049, Maracas, Lahug, Cebu City', 'jimmy.lomocso@gmail.com', '(10) wer, (10) Product 101, ', '300', 'confirmed', '10/03/14', '10/04/14 08:04:28 AM'),
(4, 'John Doe', '09465795229', '049, Maracas, Lahug, Cebu City', 'rjcantos_16@yahoo.com', '(5) Product 202, ', '100', 'confirmed', '10/04/14 12:02:57 AM', '10/04/14 09:31:08 PM'),
(5, 'Peter Paul Segura', '256-2842 / 233-6066', '049, Maracas, Lahug, Cebu City', 'deewylperez_03@yahoo.com', '(3) Product 202, (1) Product 202, ', '200', 'confirmed', '10/04/14 08:05:35 AM', '10/04/14 08:15:25 AM'),
(6, 'sdf sdf', '33', 'sdfsdf', 'a@yahoo.com', '(1) Product 101, ', '300', 'confirmed', '10/04/14 09:23:34 PM', '10/04/14 09:31:04 PM'),
(7, 'sdf sdf', 'sd33', 'sdf', 'sdf@yahoo.com', '(1) Product 101, ', '0', 'confirmed', '10/06/14 11:15:59 AM', '06/14/15 09:52:56 AM'),
(8, 'sdf dsf', '33', 'dsfsdfsdf', 'a@yahoo.com', '(1) wer, ', '0', 'confirmed', '10/18/14 11:34:45 AM', '06/14/15 09:52:38 AM'),
(9, 'john hohn', '234', 'dsdfdg', 'a@yahoo.com', '(1) Product 202, ', '100', 'confirmed', '06/14/15 09:53:36 AM', '06/14/15 09:53:56 AM'),
(10, 'a a', 'e424', 'dsdfdg', 'a@yahoo.com', '(1) Product 202, (2) Product 101, ', '400.5', 'delivered', '06/14/15 10:02:11 AM', '06/14/15 10:02:52 AM');

-- --------------------------------------------------------

--
-- Table structure for table `products`
--

CREATE TABLE IF NOT EXISTS `products` (
`ID` int(11) NOT NULL,
  `imgUrl` text NOT NULL,
  `Product` text NOT NULL,
  `Description` text NOT NULL,
  `Price` double NOT NULL,
  `Category` text NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=95 ;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`ID`, `imgUrl`, `Product`, `Description`, `Price`, `Category`) VALUES
(83, 'micromax-canvas-nitro-2-e311-400x400-imae8trm6qy8whze.jpeg', 'Micromax', 'Application', 7440, 'Smartphone'),
(84, 'download (1).jpg', 'Laptop #1', 'Laptop #1', 20000, 'Laptops'),
(85, 'download (3).jpg', 'Laptop #2', 'Laptop #2', 21000, 'Laptops'),
(86, 'download (5).jpg', 'Laptop #3', 'Laptop #3', 18000, 'Laptops'),
(87, 'download (2).jpg', 'Laptop #4', 'Laptop #4', 19000, 'Laptops'),
(88, 'download (6).jpg', 'Mobile #1', 'Mobile#1', 8000, 'Mobile'),
(89, 'images (7).jpg', 'Mobile #2', 'Mobile#2', 2000, 'Mobile'),
(90, 'download (16).jpg', 'Bike#1', 'Bike#1', 45200, 'Bike'),
(91, 'images (49).jpg', 'Camera#1', 'Camera#1', 5000, 'Camera'),
(92, 'images (33).jpg', 'Mouse', 'Mouse', 400, 'Mouse'),
(93, 'images (1).jpg', 'Keyboard', 'Keyboard', 1000, 'Keyboard'),
(94, 'images (44).jpg', 'Smartphone', 'Smartphone', 15000, 'Smartphone');

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) NOT NULL,
  `username` text NOT NULL,
  `password` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`id`, `username`, `password`) VALUES
(1, 'administrator', 'bobby'),
(2, 'admin', 'admin');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `cart`
--
ALTER TABLE `cart`
 ADD PRIMARY KEY (`ID`);

--
-- Indexes for table `category`
--
ALTER TABLE `category`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `order`
--
ALTER TABLE `order`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
 ADD PRIMARY KEY (`ID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `cart`
--
ALTER TABLE `cart`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT for table `order`
--
ALTER TABLE `order`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=95;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Download Source Code

After Downloading the source extract in your htdocs OR www root folder then run in browser.

Admin Login

  • user —  admin
  • Pass —  admin

 

1 Comment
  1. filmy says

    These are really impressive ideas in concerning blogging.
    You have touched some fastidious points here. Any way keep up wrinting.

Leave A Reply

Your email address will not be published.