Django Project - Shopping Cart

Description:

To create a website for e-shopping, such as Amazon or eBay. I used Django, JavaScript, and Python to build this website. Under "store" app, I created 4 html pages - Main.html, store.html, cart.html and checkout.html.

image

I created an administration account, to monitor what products, customers(authentication), and orders need to be added to the database.

image

When the user added items to the shopping cart, the terminal would print out the order id and quantity as below. However, on the admin page, the order history has not been built yet, and it is found that the payment method has not built up completely yet. Hence, on the admin page, it actually cannot tell if an order has been completed or not, although I created a binary section for "completed".

image

There are several features I have not managed to build or not successful. One is the number on the "cart" icon should have been altered according to the number of items in the shopping cart. The reason why this failed was probably due to cart.js code has not been created correctly.

image

The other problem is the shopping cart is failed to present a detailed list of the products for unauthorized users , which might be due to the settings of forms.

  • Authorized User image
  • Unauthorized User image

Lastly, the "payment" button has not been ready yet. I built a function named "SubmitFormData" which should print out in console saying "Transaction completed." However, for some reasons, this feature has not built out succefully, might be due to JavaScript's CSRF-Token implementation.

image

In conclusion, "Shopping World" is my first Django project, and it has been a very inspiring and exciting experience. I would continue exporing its power, adding Rest API and JavaScript, as well as advanced Python. Thanks to cs50 preparing me for all the foundations. Hope one day I could be a front-end developer!