Skip to content

My first project during my internship at 19. Basic online shop

Notifications You must be signed in to change notification settings

baltsaros/19Shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

19Shop

This is my first project during my internship 19. It was not launched during my internship and was more like a learning tool for me. Here you can find only its readme and some screenshots. Source code is provided on demand

About the project

Basic internal online shop

Tools

  • Frontend: HTML, CSS, jQuery, JavaScript
  • Backend: Django

To-do

  • Add Image model to models
  • Add photo galery to every product?
  • Update category class and add them to products
  • Add more order statuses?
  • Add date for when you come to pick up the order?
  • Fill/erase empty headers and subheaders
  • Set limits on how many products a person can order?
  • Improve validators for uploads (check for dimensions)
  • Version for small screens (mostly done)
  • Cart - change variant size from cart?

Existing functionality

  • Customer view and staff view
  • Product: add, update, delete, display all, display one; zoom image
  • Cart: add, update quantity in the order, update quantity in the stock (upon ordering), delete from the cart
  • Order: display all, display one, manage all, manage one, update order status, delete order (only by staff)
  • Filters for some pages, pagination for all tables and index page
  • Display stock, update stock quantity
  • Mail notification upon creating an order, changing its status, cancelation
  • Models: Product, OrderItem, Order, Variant, Size, Color
  • Manager can add color, size, product, variants, manage orders and stock
  • CSS for small screens (768 px and less)

Models:

  • Category - product category, currently not in use
  • Product - product itself; contains only name, description and a general image
  • Image - product image; currently not in user; was intended to be put in use for photo galery
  • Size - product size
  • Color - product color; i tried to make color options in select to disply the proper color, but my solution did not work; probably, you can find it
  • Variant - product variant; if image is none, it uses img from product
  • Order - order itself; contains general info
  • OrderItem - product variant from the order

Notes:

  • The project has a functional view style
  • So far there is a validation for img size. File extension is checked by Pillow. However, for some reasons validation error is not displayd. I tried several solutions, but without much success. Currently if there is an error, the form is simply reset
  • Cart is stored in the cache (i think this is more convenient than storing this kind of data in the db)
  • Stock is updated only upon order creation. Initially stock was updated upon adding an item to cart, but that solution had several serious flows (for example, it was easy to empty the whole stock)
  • To run hub-app-1: docker exec -it hub-app-1 bash
  • To install Pillow execute inside the hub-app-1: python3 -m pip install Pillow
  • Initially, I had used bootstrap classes, but then I decided to create custom classes instead (less dependant on bootstrap; classes fields in html look better like this; plus this is a good way to learn better css). In some places I still use bootstrap (navbar)

Sources:

Screenshots

Main page with all the products: Main page Version for small screens: Small Product page before selection: Product page 1 Product page after size and color selection: Product page 2 Product page after selection a variant with a different image: Product page 3 Notifications: Messages Cart: Cart User orders: User Orders Order details: Order details Form examples: Form 1 Form 2 Order management: Manage orders Stock management: Manage stock

About

My first project during my internship at 19. Basic online shop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published