Skip to content

av1shek/E-Commerce-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django-website

E-Commerce Website for Winter Clothes developed using Django, CSS, Bootstrap, and JavaScript. Talking about the project, it has almost all the essential features required for an e-commerce website. This project contains the user and admin side. Admin can manage products, suppliers, view logs and many more. From user side, he/she can view products and purchase and track it easily. The Admin plays the main role in the management of the website. In this project, admin performs all the main functions like managing products, suppliers, updating status and much more.

Demo

The can be visited here.
As this is not for commercial purpose so payment can be done using PayTm test credentials.
Or by selecting Paytm as payment mode -
Mobile Number - 77777 77777
OTP - 489871

Brief Details of Databases

These are the 6 tables that helps in managing data :
Customer
It contains address and account details of all the registered customer, having one to one relation with Django user model.

Product
It contains details of all the products persent in the shop like their price, description, images, no of quantity of each color and size available in our stock and each product is uniquely identified using product-id.

Orders
It contains the details of all the order received like customer name, address, contact details, and list of all products with its details. And each order is uniquely identified using order-id.

Cart
It contains JSON data of all the products which are added in cart by customers, and have one to one relation with customer model.

Message
It stores all the message sent by customers.

OrderStatus
It is automatically initialised with some message at the time when order confirms. And can be further updated it is used to show the order status when customer track their order.

Brief Details of functions defined in backend

Accounts app

Name of all the functions in this app are self-explaintory
home(request) - Redirects to home page of our application
user_login(request) - Log in user
user_logout(request) - Log out user
signup(request) - Handles signup request and verify details
regUser(form) - If details are verifed in sign up, then register new user and sends activation link
activate(request, uidb64, token) - Verify the activation link token and activate the user

Shop app

index(request)
Display the home page after fetching all the products from Product table according to with fix no products in each page and when product is tried to filter using search bar then display only those products which satisfy some condition. Pagination is also handled by this function.
cart(request)
It simply renders the cart page.
cart_update(request)
Updates the cart in database checkout(request)
It confirms the order, call the other functions to update the quantity in Product tables and initialise the Order Status of that product in Orderstatus table.
checkdb(request)
It handles the post request generated by javascript to check the availability of requested product in that item. def receipt(request, orderid)
It calculates total and grand total and send these parameters to generate receipt.
contact(request)
It accepts the message send by customer using post request and save message in database and call the function to send an Email on Admin account.
track(request)
It fetch the order status from database and retun it to html page as a response.
updateProductDb(id, types, qnty), find_qnty(id, types)
Some utility function which updates the product database and return the no of qnty available of given product id.
sendEmail(to, content)
When user will try to contact us then their message will saved in database as well as it will be send to admin Gmail account also using this function.
handlerequest(request)
It handles the request generated by paytm server by verifying CHECKSUMHASH in paytm payment integration.

Brief Details of functions defined in frontend(javascript)

checkdb(id, size, color)
It fetch the post request to get the no. of quantity of available in database of a particular product with particular color and size.
updatecart(items_json)
Sends a post request to update the cart in database.
update()
Populate the DOM of cart page and update the dom when any change is made in cart.
incr(item, e)
Increase the quantity of product in cart after checking whether it is available in our database or not in that amount.
decr(item, e)
Decrease the item in our cart.
remove(item)
Remove the item from database.
additem(idstr)
Add product in cart.
HTMLtoPDF()
Convert HTML page to PDF used in generating receipt.

Future Work

  • Profile tab for user
  • List of past orders

About

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published