This is an E-Commerce Website build for selling of any electronics products online.
In this projects a user can visit the websites, registers and login to the website. They can check all the products available for shopping, filter and search item based on different categories, and then add to cart. They can add multiple item to the cart and also plus or minus the quantity in the cart. Once the cart is updated, the user can proceed to checkout and click the credit card payment details to proceed. Once the payment is success the orders will be placed and users will be able to see the orders details in the orders section along with the shipping status of the product.
The admin also plays an important role for this project as the admin is the one responsible for adding any product to the store, updating the items, removing the item from the store as well as managing the inventory. The admin can see all the product orders placed and also can mark them as shipped or delivered based on the conditions.
One of the best functionality that the projects include is mailing the customers, so once a user registers to the website, they will recieve a mail for the successful registration to the website, and along with that whenever a user orders any product or the product got shipped from the store, then the user will also receive the email for its confirmation. Sometimes, if the user tried to add any item which is out of stock, them they will get an email one the item is available again the stock.
Note: The payment page is created only for demo purpose and its not fully integrated with any payment gateway. So for now any credit card details will be accepted and the demo orders will be placed.
Front-End Development:
Back-End Development:
Database:
STEP 1: Open MySQL Command Prompt or MySQL Workbench
STEP 2: Login to the administrator user of MySql:
mysql -u <username> -p
(Enter Password if asked)
STEP 3: Copy paste and execute the MySQL Query from the following file:-
Step 1: Create a gmail account or login to existing account in any browser
Step 2 : Go to https://myaccount.google.com/security and check if 2 step verifications is enabled or not, enable it if not enabled
Step 3: Go to https://myaccount.google.com/apppasswords and enter password if asked
Step 4: In Select an App Section: select Other (custom name) => enter "Ellison Electronics" => Generate
Step 5: After that it will generate 16 digits app password which you need to copy and save for future configurations.
Step 6: Done : Now continue to importing the project. [Don't share the above password generated to anyone]
Step 1: Open Eclipse Enterprise Edition. [Install, if not already installed.]
Step 2: Click On File > Import > Git > Projects From Git > Clone Uri > Paste The Repository Url as: https://github.com/shashirajraja/shopping-cart.git
> Select master Branch > Next > Next > Finish.
Step 3: Go inside Java Resources > src > application.properties
and update the values as below:
Step 4: Right Click on Project > Run as > Maven Build > In the goals field enter "clean install" > apply > run
Step 5: Right Click On Project > Build Path > Configure Build Path > Libraries > Remove and Update Any Libraries if Red Mark Exists > Finish.
Step 6: Right Click on Project > maven > update project > select force update > apply > close
Step 7: Tomcat Configurations:
If Tomcat Server is not configured in Eclipse :
Else If Tomcat Server is already configured in Eclipse:
or
Step 8: Check Running The Site At http://localhost:8080/shopping-cart/
Step 9: [To Change the Port, if getting error like 'port already in use'] Open The Server Tab > Double Click On Tomcat Server > Ports > Change The Port Number For Http/1.1 To 8083 > Close And Save. Now Start and you can access the project on http://localhost:8083/shopping-cart/
Step 10: Default Username And Password For Admin Is "admin@gmail.com" And "admin"
Step 11: The default Username And Password For User Is "guest@gmail.com" And "guest"
Question:1 Unable to Connect to Database?
Answer: Please check you have installed the mysql correctly and have updated the correct db details in application.properties file. Also you can try doing maven clean install and force update the project and restart.
Note:- This is a Sample Project for learning purpose, we have not much considered of web security.
Home Page
Login Page
Register Page
Category Wise Product Filter
Cart Items
Credit Card Payment
Order Details & Status
User Profile
Admin Home
Stock Items
Shipped Items
Recent Orders yet to be shipped
Add Product to the stock
Remove Product from the stock
Update the stock item
Sample Email for order placed
Class Diagram