Skip to main content

e-Commerce Site using PHP/PDO, PHPMailer, ReCaptcha, and PayPal with Source Code

Language

This is an e-Commerce Site Project with Secure Registration and Online Payment. This project was developed using PHP, PDO, MySQL Database, HTML, CSS, and other plugins. This e-Commerce Site Project has an admin panel where you can manage the Categories, Users, Products, and View the Sales. Talking about the Secure Registration, the user registration form has a reCaptcha Checkbox feature. Aside from reCaptcha, the user must register a valid email because the system will mail to the given email a verification link to verify the user's email for security purposes. As I have said about the admin panel, the Admin user must populate first the products and categories list so that the users can explore and create their transactions. For Online Payment, this system is using Paypal for checkout.

Features

  • jQuery Cart Adding and Quantity Adjustment
  • Can shop even without logging into the site but can't checkout
  • Product Search
  • Magnify product image
  • Email verification on signup
  • Google ReCaptcha on signup
  • Forgot password email
  • Paypal express checkout
  • Printable sales via date range
  • Manage Users
  • Manage Product Categories
  • Manage Product List

Plugins

  • AdminLTE
  • TCPDF
  • PHPMailer

How to Run

Requirements

  • Download and Install any local web server such as XAMPP/WAMp.
  • Download the provided source code zip file. (download button is located below)
  • Valid Email for Mailing Purposes.
  • Paypal Account for as a Buyer and Merchant. Create a sandbox account for this to test the online payment feature. Paypal Dashboard for Developers

Installation and Setup

  1. Open your XAMPP/WAMP's Control Panel and start the "Apache" and "MySQL".
  2. Extract the downloaded source code zip file.
  3. If you using XAMPP, copy the extracted folder and paste it into the XAMPP's "htdocs" directory. And for WAMP, paste it into the "www" directory.
  4. Import the included .sql file located in db folder which is the database of the system. If you have no idea how to import, please refer to my tutorial on How import .sql file to restore MySQL database.
  5. After a successful import, open the extracted folder and open conn.php located in the includes folder. Edit the database name in the connection depending on the name of the database you created in importing the included .sql file.
  6. Open the "register.php" and "reset.php" with your preferred text editor and find the variable just like the image below to configure your email for sending mails.
    mail_config
  7. Open a web browser and browse the Project. i.e. http://localhost/ecommerce

Users

There are two types of users to the system which are the admin and the buyer.

For the admin account, you can use this credential:
Email: [email protected]
Password: password

For the sample buyer:
Email: [email protected]
Password: nurhodelta
Or you can also create a new account.

Optional Task

  • Create ABOUT US and CONTACT US page
  • Social Media Links
  • Subscribe email

That's it! I hope this project will help you with what you are looking for and for your future PHP projects. If you found any bugs or errors in the system or if you have any comments or suggestions, feel free to comment below or message me.

Happy Coding :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byDollarsoft (not verified)on Mon, 05/14/2018 - 04:15

tnx bro pls help me ur code is nice but i get mailer error message could not been sent mailer error

Be sure to edit the email credentials. If error persist, send me a screenshot of the error and code to my fb account.
Submitted byShalomzy (not verified)on Fri, 06/01/2018 - 18:13

There is error in adding products, date_view error
Submitted byBoobathi P S (not verified)on Fri, 06/22/2018 - 20:08

Hi, Nice work really helpful for beginner to develop e-commerce site. While signup a account then click a submit button after facing following issue in register.php This page isn’t working domain.com is currently unable to handle this request. HTTP ERROR 500 pls help how to fix it
Submitted byboobathi6on Fri, 06/22/2018 - 20:11

Hi, Nice work really helpful for beginner to develop e-commerce site. While signup a account then click a submit button after facing following issue in register.php This page isn’t working domain.com is currently unable to handle this request. HTTP ERROR 500 pls help how to fix it
Submitted byAlma Balma (not verified)on Fri, 01/18/2019 - 17:03

default currency is $....how to change USD currency to MYR...where should i change the code?

Hi, Nice work really helpful for beginner to develop e-commerce site. While signup a account then click a submit button after facing following issue in verify.php Fatal error: Call to undefined function password_verify() in D:\xampp\htdocs\Shopping\ecommerce\ecommerce\verify.php on line 17 pls help how to fix it Thankx

Add new comment