E-commerce -Site in PHP with source code
PHP Projects

E-commerce Site In PHP With Source Code

Project: E-commerce Site in PHP with source code

– To download E-commerce Site project for free (scroll down)

About Project

E-commerce site project is developed using PHP, CSS, Bootstrap, and JavaScript. Talking about the project, it has all the required essential features. This project has a user side where he/she can view product category and add products to cart and proceed for checkout whereas from administration side he/she can view sales, number of product, users, daily sales report, add product and categories. The user can also leave comments on each product if he/she wants. In this project, all the main functions are performed from the Admin side.

About System

Admin has full control of the system, he/she can view daily/monthly sales report for each year, manage all existing users, add, view, edit, delete products and categories. Monthly sales report is represented in the form of Bar Graphs. While adding products, the admin has to provide Product’s name, select category, price, upload product’s photo and write a description. Adding a product category is simple, the admin just has to provide Category name. Just like the other popular e-commerce, here while looking a product’s image the images magnifies whenever mouse cursor is dragged onto it. The system redirects to Paypal for checkout. A responsive dashboard is provided in the admin panel for the easy management of the site.

In short, this E-commerce site in PHP project is a bit similar with a WordPress e-commerce site. Mostly, the adding description has the same feature of that of WordPress. All the important features that are required for an eCommerce site is set for this project. Design of this project is pretty simple and responsive so that user won’t find it difficult to understand, use and navigate.

To run this project you must have installed virtual server i.e XAMPP on your pc (for Windows). E-commerce Site in PHP is free to download with source code. For the project demo, have a look at the video below.

Features:

  1. Admin Panel
  2. Login/Sign Up
  3. Magnify product image
  4. Product Cart
  5. Google ReCaptcha
  6. Checkout using Paypal
  7. Add, Edit, Remove and View Products
  8. User Management
  9. View daily/monthly sales
How To Run??

After Starting Apache and MySQL in XAMPP, follow the following steps

1st Step: Extract file
2nd Step: Copy the main project folder
3rd Step: Paste in xampp/htdocs/

Now Connecting Database

4th Step: Open a browser and go to URL “http://localhost/phpmyadmin/”
5th Step: Then, click on databases tab
6th Step: Create database naming “ecomm” and then click on import tab
7th Step: Click on browse file and select “ecomm.sql” file which is inside “database” folder
8th Step: Click on go.

After Creating Database,

9th Step: Open a browser and go to URL “http://localhost/ecommerce/”
For Admin Panel
Final Step: Login from the User’s login side. Just provide the Admin’s login detail, it will redirect you to Admin panel.
Note: Don’t go to URL “http://localhost/ecommerce/admin” for Admin Panel. Just provide Admin’s login detail in User’s login side.
Provide the username and password which is provided inside the “Readme.txt” file.

LOGIN DETAILS ARE PROVIDED IN “Readme.txt” FILE INSIDE PROJECT FOLDER

DOWNLOAD E-COMMERCE SITE IN PHP WITH SOURCE CODE: CLICK THE BUTTON BELOW

 



This Post Has 247 Comments

  1. Lawrence Ansah-Addo Reply

    Is it multi-vendor?

    Can you modify it into multi-vendor system? How long?

  2. kohli Reply

    please complete the sign up.
    i tired to fix phpmailer.

  3. Japs Ralph Reply

    How do you change the currency?

    • Opeyemi Wasiu Reply

      I need the same answer please, how can i change the currency, i also wanted to add some other pages i would like to have a template for about and contact us page ,and how do i remove the facebook comments

      • Opeyemi Wasiu Reply

        I have been able to change the currency, its within the HTML pages check every pages with prices then change the ASCII

        • Corona Virus Reply

          how you did that ,can you please explain.

        • Revanthshiva Reply

          where it is bro i can’t find it

          • Rance

            look for the characters & # 36; and change it with your currency. It’s in the product.php, category.php, cart_view.php, admin/products.php & admin/home.php

      • Steven Reply

        The currency is set by default in USD using HTML character code set. In the products, transactions, cart, etc .php files, find the code where there is ($) which is the code for $(USD). Change this to your preferred currency e.g EUR. Ur effort is pointless though because the website is not fully functional 🙁 but worth the learning.

  4. Atif Reply

    sir never downloading the file through google drive 🙁
    help me sir

  5. ndkanna Reply

    there is no database folder

  6. Prashant Reply

    There is no add to card option at all. I fixed the SMTP problem tho.

    • Ruben Reply

      Hi Prasanth, could you help me on how you solved the SMTP problem to send authentication via email?? Thanks

    • Ruben Reply

      can you help me out on how you fixed SMTP problem

  7. Somebody Reply

    Hello, why do you use ‘slug’ when displaying single product, why not use ‘id’ which will be unique (auto-increment in table). Isn’t it like the standard method, go by id? what if there are 2 or more similar ‘slug’ fields?

  8. Vindhu Reply

    Sir ,I cant see any payment options in cart view.
    How can the user or existing user pay and process the transaction?
    The Java script for PayPal is there but where is it connected?

  9. safaf Reply

    can I get the souce code for triigering (for User status) and stored procedure that you used here

  10. guest Reply

    Can you add quantity in this ecommerce and when the customer buy a product the quantity will deduct on how many he buys

  11. Saumya Reply

    How to properly installed ….
    Please give me a YouTube video
    I am student. I don’t know how is it possible. So…

  12. joshua Reply

    why is that register.php is blank? Can you fix this? thanks

  13. jun Reply

    admin panel when click on more info showing url return is not found

  14. [email protected] Reply

    smtp authentication error

  15. faruk Reply

    how to deploy on real time server ? where is ipconfig file ?

  16. Piyush Reply

    Nice Work can i host this project for testing purpose?.

  17. siva Reply

    sir
    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate
    I am getting this error on forgot password page
    can u please tell how to fix this error
    where can i change Gmail and password parameters in phpmailer

  18. Sachin Reply

    E-commerce Site In PHP With Source Code

    I Have One This Project How to solve
    Error This :Warning: mktime(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in C:xampphtdocsecommerceadminhome.php on line 218

  19. irbaz Reply

    not working E-commerce Site

  20. irbaz Reply

    error not showing number of user,total sales,number of product,sales today. in admin panel dashboard please help me.what can i do

  21. Irbaz Reply

    Sir where is book.php,student.php,return.php and borrow.php files can you please tell me sir

  22. lusty Reply

    one of the best projects… can i modify and use for personal uses?

    and how can i link my facebook comments to each product?

  23. Nikola Jovanovski Reply

    Hello, I am having a problem with SMTP, any help with that what should I do to get it fixed ?

  24. nur hidayati Reply

    hai can i ask you is it can register to another admin..if i want to be another admin what i want to do..?
    i want the user who register the website to be admin how i want to do it? can you help me..

  25. suabrashi Reply

    what will i put in database ?
    id ?
    name ?

  26. Christopher Reply

    Hello can you help me i want to change the pay pal payment to local payment when a customer pay the details goes direct to a database instead of paypal the java script codes confuse me please help

  27. 3cy Reply

    Hello, how can I change the background color of the main content and everything??

  28. webdeveloperr Reply

    How can i add subcategory functionality in this code?

  29. Muhammad Danial Reply

    please “Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.” please fix this or tell solution in signup process.. Thanks in advance

  30. sudamericano Reply

    MUY BUENO..!

  31. Adarsh Reply

    My website is not running plzz tell me fast plzz

  32. Kripaja Thomas Reply

    sir,
    I can’t find the file Readme.txt in project folder. How I know existing admin user name and password?

    • Fabian Ros Reply

      we always provide 2 text files named as “READ ME FIRST.txt” and “01 READ ME FIRST.txt”. look through project files. if you can’t find it, redownload it and check!

  33. notsodeft Reply

    which css file should i open to edit things such as background, buttons etc?

  34. Irbaz Reply

    Sir in registration page google recapcha is not showing what is the problem. Can you please tell me

  35. Irbaz Reply

    Sir what is the password for [email protected]

  36. Rajat Mishra Reply

    Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in C:xampphtdocsecommerceincludessession.php on line 14 .. This error is showing pls tell me the solution. It’s urgent I want to add this full website in my project.

    • Rajat Mishra Reply

      Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in C:xampphtdocsecommerceincludessidebar.php on line 13 .. The sidebar is giving the same error0.

  37. Junaid Reply

    Sir, I’ve an issue with this project. New Categories not added through admin panel. It’s been showing error while adding new category in this. Also is there any option to change payment mode from pay-pal to cash. Kindly update me regarding this. I will be thankful to you.

  38. rbs Reply

    hi sir,
    i am getting recaptcha error. how to solve it.
    i’m generate recaptcha key and paste it .but i’m also getting error.
    how to resolve it, please help me.

  39. Morivm Reply

    cat slug wont insert in in database category

  40. asdadad Reply

    how to add another user?

  41. Irbaz Reply

    Error while registration. Email is not sending while registrating. Error is message could not be sent. Mailer error: SMTP Error: could not authenticate.

    Sir how can i solve this error ple
    ase inform me

  42. Joshua Jenkins Reply

    Why do none of the dashboard links for “total sales”, “number of products”, “number of users” and “sales today” work?

  43. Keita Reply

    Hello sir
    i did all following step except stept 9 it said object not found
    What can i do sir??
    Thanks u

  44. Yakshita Reply

    Not able to open admin panel
    cant load only

  45. Sif Reply

    Hi. This is a great work. Can you paginate the products in category.php to have a limit on how much products will we displayed. just a suggestion. Thanks.

  46. SDM Reply

    Help! it says ::
    Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in C:xampphtdocsES_PHPecommerceincludessession.php on line 14

  47. helpadmin Reply

    Hey admin can you make a step by step on how to fix this SMTP mailer error , badly needed thanks.

  48. baron Reply

    How to change background color!!??

  49. kee Reply

    i have some problem about code execution. after following the steps given in the instruction nothing is displayed when i try to open the page from the browser (google chrome)

  50. bardog Reply

    Hello, I was getting an error which stated SQLState420000 1046 you have an error in your sql syntax, check the manual that corresponds with your Mariadb server version for the right syntax to use where=’27” at line 1, I’ve checked the admin/ product and admin/product edit and tried to altered things but none do so . I’ve tried to checked the answer but It seems that my little brain cannot function properly because I haven’t got a long ass sleep. Please consider helping with me with this, Thank you so much. 🙂

  51. Irbaz Reply

    Sir can you please explain this code. It is very helpful to us

  52. Irbaz Reply

    Sir do you have multi vendor ecommerce project in php

  53. eric Reply

    SQL query:


    — Database: ecomm

    — ——————————————————–


    — Table structure for table cart

    CREATE TABLE IF NOT EXISTS cart (
    id int(11) NOT NULL,
    user_id int(11) NOT NULL,
    product_id int(11) NOT NULL,
    quantity int(11) NOT NULL
    ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1

    MySQL said: Documentation
    #1046 – No database selected

  54. Josh Reply

    Can we recover our password?

  55. Mohamed Reply

    How can I change the currency????

  56. dane Reply

    can i modify it and used it as my website or for school

  57. dane Reply

    the capcha will work after having a domain/web hosting?

  58. dane Reply

    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate. after i create a new user this error showed up

  59. Ray Reply

    In admin panel dashboard while clicking number of user,total number of sale,number of product,sales today. this will not open in admin panel and in url link it will show book.php,student.php,return.php and borrow.php object not found. please tell me solution see number of user,total number of sale,number of product,sales today.

  60. ritik Reply

    i am getting this error when i run the project . i have installed wamp server in my system

  61. Sidney Reply

    Please sir where is the php file where you have create the connection variable ?
    i want to put my own database name in the project because my webhost do not permit to change database name like i want
    thank you.

  62. pankaj Reply

    i am using it with local host and when i am trying to login admin dashboard or user dashboard using the id password given by you i m getting this error “There is some problem in connection: SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: NO)”

  63. Rakesh Reply

    how to change currency.

  64. Rakesh Reply

    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate. while forgot password

  65. saddam saeed Reply

    In sign up module Capcha is not working . Kindly fix this

  66. Rakesh Reply

    forgot password not working

  67. lilywekwachiwu Reply

    i am having issues with the code for this project

  68. iaab Reply

    Hello

    I downloaded your E-commerce Site In PHP With Source Code and when i typed in the URL http://localhost/ecommerce/ into the browser, i get a blank page and when I type into the broswer http://localhost/ecommerce/login.php , it takes me to the login page and again, I login with [email protected] and its password, I get this error message

    “There is some problem in connection: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

    Fatal error: Call to a member function prepare() on a non-object in C:UsersImoro Amin A. BasitDesktopecomercerootecommerceverify.php on line 12” .

    Again, when I type into the broswer http://localhost/ecommerce/signup.php , it takes me to the signup page and after completing the form and cliking on the signup button, i get this error massage as well;

    There is some problem in connection: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

    Fatal error: Call to a member function prepare() on a non-object in C:UsersImoro Amin A. BasitDesktopecomercerootecommerceregister.php on line 41.

    What should i do to the code fix the above errors please?

  69. Pankaj Reply

    hi i did everything as you have mentioned . but i am getting this error while login in or registering .

    There is some problem in connection: SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: NO)

    please help

    note:- i have mac and i am using mamp and netbeans

  70. Pankaj Reply

    i am a beginner . please tell me how to configure in db.php / conn.php / dbconn.php

    • Fabian Ros Reply

      open that file
      you’ll understand
      you have to configure server details according to your own

      • Pankaj Reply

        PDO::ERRMODE_EXCEPTION,PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,);
        protected $conn;

        public function open(){
        try{
        $this->conn = new PDO($this->server, $this->username, $this->password, $this->options);
        return $this->conn;
        }
        catch (PDOException $e){
        echo “There is some problem in connection: ” . $e->getMessage();
        }

        }

        public function close(){
        $this->conn = null;
        }

        }

        $pdo = new Database();

        ?>

  71. Sasya Reply

    Hello there! Sorry, but I got a problems when signup. What should I do? Thank you.

  72. Sidhu Reply

    I have a problem. I want help. Please help me. I want to change payment mode from paypal to cash and simple credit/debit card payment form for project testing. I want to ask how to integrate it. And how to submit cash and credit card information into database. I’m beginner and don’t know how to do it. Anyone please help me.

  73. Kelechi Reply

    I download the E-commerce-site-in-php,after taking the due process in installing. i was getting this message when I try to login with the login details provided.
    Fatal error: Call to undefined function password_verify() in C:xampphtdocsecommerceverify.php on line 17.
    please help me out.
    and reCAPTCHA IS NOT WORKING ALSO.
    PLEASE HELP ME OUT MORE ESPECIALLY ON THE ERROR OF LOGIN IN.

  74. Damilola Reply

    How can I remove the captcha from the sign up page , if I try to sign up it keeps on. Saying please enter captcha which is not appearing on the sign up page …

  75. Taffa Reply

    can I have the parameters of the paypal account of the project? thank you in advance

  76. Kharisma Perdana Reply

    how to remove facebook comment section in the bottom of each product

  77. msajith15 Reply

    i have problem that is Message could not be sent. Mailer Error: SMTP Error: Could not authenticate. this error was show when i sign up

  78. SAIJU Reply

    error in session

  79. imran Reply

    hello can we make this e commerce as a multivander hope to hear from u soon

    • deril Reply

      please it is not completely loading what can i do

    • deril Reply

      i keep on having this problem
      Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in C:xampphtdocsecommerceincludessession.php on line 14

  80. arun Reply

    facing issue while sql file adding

  81. willy Reply

    this project is great

  82. Rifat Reply

    how to add cash on delivery system instead of paypal? and is there any way to bypass/use model paypal details to go to the sales page?

  83. Rudiny Reply

    When i try to connect it shows an error on line 17 “verify.php”

  84. Sarvesh Reply

    Someone pls help me with Sign up page its showing SMTP error can i remove that feature. If yes then how??

  85. fazy Reply

    why i cant sign up, update user, add product? please help me.

  86. riza Reply

    thanks for open source code,i can modify to be my project 😀

  87. naim Reply

    please send me
    user id and password
    Email : [email protected]

  88. rex Reply

    please how can i change currency to Nigerian Naira???

  89. Web Roland Reply

    Salut, ce projet est très bon, vraiment complet !!!! Mais j’ai un problème au niveau de l’inscription, erreur SMTP, c’est vraiment un casse tête.
    Besoin d’aide SVP ! Merci

  90. sadi ahmad Reply

    sir subscriber input box cannot work please hlep me.
    Thanks!

  91. ANUPAM CHANDA Reply

    this is very nice project , but i have faced problem to sing up every times give a message that please check captcha properly.

  92. Needhelp Reply

    Please check gmail inbox, I sent a screenshot to [email protected] Thank you

  93. Dragonite Reply

    Where I change Name of Database ? plz Tks

  94. Pramit Majumdar Reply

    Hello sir
    First of all I want to thank you for making this amazing project.
    However,when I’m trying to print the sales report.
    This error is being shown:

    Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in C:xampphtdocsecommercetcpdftcpdf.php on line 17778
    TCPDF ERROR: Some data has already been output, can’t send PDF file

    Could you please tell me how to solve this??
    Thank you in advance

  95. uwks Reply

    SQLSTATE[HY000]: General error: 1364 Field ‘cat_slug’ doesn’t have a default value

    How to fix it please

  96. prathamesh zore Reply

    sir whenever i go to sign up page and create new user it always show please fill the form and also i dont want captcha in sign up how can i delete captcha function?

    although great work.I really loved it

  97. sammi Reply

    hello, am having a problem with adding new products
    SQLSTATE[HY000]: General error: 1364 Field ‘date_view’ doesn’t have a default value

  98. Mohd Reply

    hi i am using this template but showing Error!
    Cannot activate account. Wrong code.
    please help

  99. Ravindu Reply

    Hello,
    I like your projects and those are awesome!!!
    I would like to learn these things. Can you do some tutorial videos for this project? Like, step by step actions to develop this project.
    Thanks!

  100. Devender Reply

    hello Sir Everything is working properly there is only one error
    in the registration page, when i m changing google recaptcha, i dont know why
    recaptcha is working properly but when i fill up the form then there is showing one message fill the form properly like this message
    sir can you tell where is secret key i thing i did not place my secret key

  101. Devender Reply

    sir error is fill the signup Form first

  102. abbas mohamed Reply

    thanks allot you are very genuine

  103. bean Reply

    take alook … not malicious?

  104. Er. Aashish vivek Reply

    how I use Cash on delivery

  105. Garioni Reply

    Please how can I access the payment page

  106. Garioni Reply

    Please how can you checkout and do the payment to complete transaction

  107. Deltwin Reply

    Hi, how i can resolve SMTP error? I configured it.. If you tell me: delete it and create new process in register.php how? Thanks, Bye.

  108. ahsow Reply

    Is this a multi vendor e-commerce?

  109. abooya Reply

    Anyone know how to fix the SMTP error? Need help please 🙁

  110. usa Reply

    how to display product in index page ???

  111. maria capilitan Reply

    there something error and the pop up msg is “Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.” how to fixe it.?

    • maria capilitan Reply

      In sign up function something wrong because after I fill up on the sign-up form, it can’t log in. why? but my new acct is inserted on the database.

  112. sss 001 Reply

    Hi i installed as per the given instruction but while browsing http://localhost/ecommerce/ i am getting a blank page showing these EcommerceSite,
    HOME,
    ABOUT US,
    CONTACT US,
    CATEGORY menu bar only, please guide where i am making a mistake

  113. Allan Reply

    How Do you set up the phpmailer

  114. Ibrahim S Reply

    its not have database folder

  115. Ruben Reply

    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.
    Any comments on this on how to resolve?

  116. muhammad ikhram Reply

    hello, i want to change $ to RM. can u guide me? because i cannot fine the code.

  117. Afridi Shariff Reply

    Hi there this website doesn’t have order button how can I add that

  118. harshit garg Reply

    m getting an error . after creating a database localhost/ecommerce i wrote then page not display properly

  119. BansheeJooja Reply

    How do you make a transaction? I cant seem to login in paypal. Thanks!

  120. afikah Reply

    hi, why i cannot do the sign up?

  121. ronald peter Reply

    very useful and handy…..codes are working properly tq!!

  122. catherine penava Reply

    Hi
    Where do you enter the captcha secret ?
    thanks

  123. DuckieSoical Reply

    I want to make a Account and if i do that he says Code what code can i change it?
    And change the PayPal Link?

  124. DuckieSocial Reply

    If i want to register it says Authentication Failure something like that can Someone help me and how can i change the PayPal link?

  125. ansh Reply

    where is the user login ?
    I’m not able to find it.

  126. aqeel Reply

    i want to add an option of cash on delivery.
    help me to enter that option

  127. Binyam Tesfaye Reply

    I was trying to customize the PHP Ecommerce System locally, but it says verify.php not working like HTTP error 500. How can I use the system, is it for free or I have to purchase it?

  128. Dilan Reply

    When registering new user im getting this error “Please answer recaptcha correctly” even if check box is checked correctly

  129. Opeyemi Wasiu Reply

    How can i change the currency, i also wanted to add some other pages i would like to have a template for about and contact us page

  130. TamaleMoses Reply

    Janobe thanks for your site.
    My Question was can I also use 000.Webhostapp.com to host it/hostigator.
    help me out Asap

  131. Dilan Henricus Reply

    Hi mate, i love the work you’ve done with this project. 🙂
    i do have a problem though.. monthly top seller part is not visible in my browser :/ is this something you can help?

  132. Navneesh Reply

    Sir how can we change the db name

  133. Priya Reply

    Recaptcha is not working
    Can you pls explain how to work on recaptcha in localhost

  134. [email protected] Reply

    There is problem with category when we adding new then that category showing the smart phone

  135. [email protected] Reply

    I want to add Cash on delivery option
    And Remove PayPal payment gateway how can I do this?

  136. Benice Reply

    Hello, please help me, I’m using Ampps and this is what I see on my browser while trying to load the file “Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in D:\Program Files\Ampps\www\ecommercenew\includes\session.php on line 14″ please help thanks.

  137. Benice Reply

    Hello, please help me, I’m using Ampps and this is what I see on my browser while trying to load the file “Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in D:\Program Files\Ampps\www\ecommercenew\includes\session.php on line 14” please help thanks.

  138. Revanthshiva Reply

    how to change currency

  139. Nitin Reply

    Sign up page is not working properly

  140. Perry ThePlatypus Reply

    I did everything as in the video but it doesn’t look like the project is connecting to the database . No picture is showing all i see is the main bar from above and that’s it. Any help please?

  141. Rance Reply

    The signup form always says ‘Please answer recaptcha correctly’.Please help. I’m stuck.

  142. Vaishnav Parkar Reply

    hii sir you have done the great ptoject sir i just want to know to integrate paytm gateway in the php website project

  143. Hiroshen Rao Reply

    how to change admin login details and user login details .

Leave a Reply

Your email address will not be published. Required fields are marked *