- Project summary
- Design
- User Experience
- User Stories
- Features
- Existing Features
- Features to be implemented
- Technologies used
- Testing
- Deployment
- Local deployment
- Heroku
- Credits
Full Stack Framework website project with Python 3.7 and Django 3.
- The goal of this project is to create a simple yet fully functional e-commerce website shop.
- Build simple, reusable django ecommerce app that can be used as an template and reference again in the future projects.
The website was designed with mobile first approach with user in mind. The wirefames with first design can be found here.
The project uses Poppins and Roboto fonts from Google Fonts Library Main color #74ab8c is used for topbar and footer.The color was chosen to match with product collection color.
'Simplicity, usability with elegance to meet exact needs of customer.'
- Browse products within the store
- Filter the products by category
- Search product or info
- Add products to the cart
- View and modify cart
- Apply discount codes
- Go through simple secured checkout proccess
- Be able to place order with or without the account
- To have an options for paying for the order
- Register an account
- Login to dashboard to modify personal info
- See status of the recent order(dispatched?)
- See order history
- Print invoice
- Find contact info
- Get notifications about actions on the website and also via email regarding the orders
- Be able to login to dashboard where I can find info about
- Customers
- Orders
- Status of orders
- See and print Invoices
- Bee able to export orders as csv
- Be able to add, edit or remove orders
- Edit customers info
- Contact customers
- Topbar with logo - Full page width container with logo linking to the home page.
- Search bar - available on all pages able to query string in the whole database and display the results on the search.html page
- Responsible navbar:
- On larger screen display the links from the left and accounts dropdown with cart status on the right
- On smaller screen display hamburger icon for puldown menu with links on the left and cart and accounts dropdown menu on the right
- Cart displaying current amount of items in cart, linked to cart detail page
- Account access dropdown menu for register,login, logout and dashboard view. For NOT logged in user, it displays link to login or register page, for logged in users, logout and dashboard view and personal message.
- Footer with
- Section for displaying quick links and
- Section with store opening hours and contact information(linked to email or phone app)
Simple page with some graphics displaying bestselling products. Products displayed here are filtered based on attribute 'bestseller', specified in the models and editable within admin area. Her, user has an option to add product to the card without specifiyng quantity.This page can be also used for announcements, news, updates.
Page displaying products filtered based on attribute 'special_offers'.
Main Product list page. This page lists all products available within the store. Each product is placed in the container linked to the product detail page. Each container contains product name, image, content, price and form for adding chosen amount of item to the cart. After clicking on add to cart button, product/s is/are added to the cart und user is transfered to the cart view page. This acts also as a confirmation that the product/s been added to the cart.
After clicking on the container with the product, user gets redirected to the detail page of the product.
On this page, category filter, located above all products, can be applied to display all or filtered by 'category' products.
After selecting amount and pressing add to cart button, user is redirected to the cart page
Displaying only products in selected category.
Full site search is performed after entering string into the searchbar box. User is redirected to the search result page where relevant results are displayed
If cart is empty, only 'Cart is empty is displayed'. After adding an item to the cart(clicking add to cart button), user gets redirected to the cart page where products present in cart are displayed on the left with the ability to update ammount of product/s or remove the item/s completely from the cart. Price is automatically calculated after add, edit or remove item/s (user actions).
Currently, if user is not logged in, after clicking on checkout button on cart page, user is redirected to the page where log in or continue as guest checkout options are displayed. This is giving user freedom to choose to buy items without registering an account.
- Clicking here on sign in link will redirect user to the sign in page. Items in cart persist after succesfull login.
- Clicking on continue as guest will redirect to the order create page where user is required to fill in personal details.
User is presented with order form where details like address, name, etc are required to place an order and to continue to payment page.
User is presented with the option to select either stripe or paypal as payment gateway. Clicking on stripe pay now button will open stripe payment form in new window where correct credit card details are required before they're submitted. If details are correct, payment is processed, and user is redirected to the custom payment_success page.
Standard django forms and sessions are used for managing user accounts
- Option to export orders in the csv format
- Ability to export individual order in the PDF format
- Sending emails from the app to the customer
- Recommendation engine for displaying popular and frequently bought items
- Customer dashboard to be populated with personal details, recent orders, invoices
- Full PayPal integration
- Testing
Folowing programming languages, technologies, libraries and tools were used for building the project:
- Python 3.7.4
- Venv Virtual environment
- Django 3.0.4
- GitHub
- Travis
- Heroku
- VS Code
- AWS S3
- PostgreSQL
- SQlite3
- HTML
- CSS
- JavaScript
- Bootstrap
- Adobe XD
- Stripe
- Paypal
Google Chrome's and Firefox's Development tools on local pc were constantly used to test changes I made to project and to make sure its displaying correctly on all screen sizes. I also used different mobile devices like phones, tablets and iPads for checking correct mobile responsivennes.
For code Validation:
Forms and inputs are validated by django itself.
Pep8 linter was helpful by highlighting syntax errors during development.
For my version control I used Github and Heroku for hosting the live project.
- Open Terminal in the desired project directory of local maschine
- Create and activate virtual environment if necessary.
python3 -m venv venv
source venv/bin/activate
for linux maschine. - Enter folowing commands :
https://github.com/frankkode/brightershop
(will download and unpack the project)
pip3 install -r requirements.txt
- In the main project folder of the project directory, where settings.py lives, create .env file and enter the following:
- SECRET_KEY = "your own key" # Django app secret key
- AWS_ACCESS_KEY_ID = "your own key" # Amazon S3
- AWS_SECRET_ACCESS_KEY = "your own key" # Amazon S3
- STRIPE_SECRET_KEY = "your own key" # Stripe
- STRIPE_PUBLISHABLE_KEY = "your own key" # Stripe
- DATABASE_URL = "your own key" # Postgres key from Heroku
- CLIENT_ID = "your own key" #Paypal
Replace the "your own key" value with your secret keys
- In the terminal, enter the folowing commands :
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
In the browser, open http://127.0.0.1:8000 and the project should be now live and ready to use.
- Create the app in Heroku.
- Add Heroku Postgres free Hobby level in the Add-Ons section for serving postgres database.
- Copy all variables (keys) from the .env file located in the root folder of the project directory to the Config Vars section in Heroku->Project->Settings.
- In Heroku->Project->Deploy section connect the github repository of the project and Enable Automatic Deploys from the master branch if thats the case. Otherwise, manual Deploy Branch option is available too.
- Before Deploying the Branch, Procfile and updated requirements.txt files are necessary to be in the root dir of the folder.
- If automatic deploys were selected, from now on the project updates after every commit to github.
- If Deployement, build, went successfuly, restart the dynos in Heroku -> Project Section and project.
- Allowed Hosts section in settings.py file should now be updated in order to serve the website.(Add deployed heroku project website address to the python
ALLOWED_HOSTS
dictionary ). - The project should be now visible to the public on the https address Heroku provides.
The live version of this project deployed to Heroku can be found here.
Product images used from the official product catalog of the company.
Banners and graphics created by myself using Pixabay and Canva.
Product description used from product cataloque
Code Institute Ecommerce project
Django Official Website
Youtube videos and Udemy courses
Django related books
Brighter shop manager