Online store
An Ecommerce website having all basic functionalites with paytm as payment gateway and an admin panel where you can insert , delete and modify products detail and view user query.
Dependencies :
LAMP/WAMP stack or any web server of such kind (It's been tested on both LAMP and WAMP stack)
Structure of the Repository
This repository has following structure:
admin │ ├── admin.php : Contains an html form and checks the username and password for admin panel │ └── Image : This directory contains images that are being used in the for selling │ ├── add.php : This file adds new product │ ├── Canon_dslr.jpg │ ├── database.php : This shows the whole information about products │ ├── delete.php : This file deletes a record from database │ ├── edit.php : This file edits a record │ ├── t-shirt.jpg │ └── watch.jpg ├── basicDetail.php : This file displays the basic Details of the user and gives option to edit them ├── cart.php : This file displays the items in the cart of the user that has logged in ├── cart-remove.php : Removes an item from cart ├── favorite.php : Displays items that were marked as favorite by the user ├── include │ ├── bootstrap-3.3.7-dist : Frontend Framework │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap.min.css.map │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ └── bootstrap-theme.min.css.map │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js │ ├── bootstrap.css │ ├── bootstrap.js │ ├── Check-if-added.php : This file checks if an item is already there in cart │ ├── common.php : This file establishes connection with the database │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── jQuery.js ├── index.css ├── index.php : The start page of our store ├── lebens.sql : contains all the tables, database files ├── login.php : Displays a login page ├── login_script.php : contains the script to check the password and username entered in login form ├── logout.php : logs out a user ├── manage_address.php : Displays all addresses entered by user and gives an option to add or delete them ├── manage_script.php : Adds or deletes the address of the user depending upon the choice made ├── my_order.php : shows all the orders made by user ├── PaytmKit : This directory contains files for paytm authentication │ ├── lib │ │ ├── config_paytm.php │ │ └── encdec_paytm.php │ ├── pgRedirect.php │ ├── pgResponse.php │ ├── TxnStatus.php │ └── TxnTest.php ├── private │ ├── config.properties │ ├── private.properties │ └── private.xml ├── product_detail.php : Shows the all the details of product once you click on the image ├── profile.css : css for profile.php ├── profile.php : shows profile of the user ├── README.md : This where you are :p ├── search_form.php : code for a search bar ├── search.php : script for searching ├── sidebar.php : creates a sidebar ├── signup.php : displays a signup form ├── signup_script.php : script for signup page ├── style.css ├── success.php : user is directed here if the product was purchased successfully ├── support_current.php : shows current tickets generated by user ├── support_old.php : shows old tickets that were generated by the user ├── support.php : displays the html page where user can view old/current tickets or add new └── support_script.php : adds new tickets into the database
HOW TO USE THIS
First fork/clone this repository and install all dependencies (Lamp/wamp or any web server supporting php and mySql). To install Lamp you can follow this tutorial : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04#how-to-find-your-server-39-s-public-ip-address
Windows user :
After forking this repo include it in the www folder inside wamp
Linux users :
After forking this repo include it inside /var/www/html folder
Import the lebens.sql file in mysql database named "lebens", if you want to use different database name then you will have to change it in include/common.php, just replace lebens with name_of_your_database in mysqli_connect function.
Add the username and password of your database in the file ./include/common.php inside mysqli_connect function
now on linux you can simply write http://localhost/online-store-master

To open admin panel run admin.php and use following credentials username = deepti password = deepti
to test the payment gateway (using staging credentials) you'll need to login/signup first and click on buy now button you'll be redirected to paytm's payment gateway use phone number : 7777777777 and OTP : 489871