Giter Site home page Giter Site logo

app-generator / ecommerce-django-stripe-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 8.87 MB

Django Stripe Mini Ecommerce - Sample APP | AppSeed

Home Page: https://www.youtube.com/watch?v=7U9qRKR-src

License: Other

Python 1.20% CSS 17.81% JavaScript 1.03% SCSS 18.16% HTML 61.80%
appseed-sample django-stripe ecommerce

ecommerce-django-stripe-demo's Introduction

Django & Stripe Mini eCommerce

Open-source mini eCommerce project that loads the products from JSON files saved in the templates directory (no database required) and uses a decent UI for page styling - Powered by Django.


Roadmap & Features

Status Item info
โœ… Django For backend logic
โœ… Stripe Payment processor
โœ… Soft UI Design (Free Version) by Creative-Tim
โœ… JSON Products definition - see sample
โœ… Automatic Products Discovery Source DIR: templates\products
โœ… Dw Products from Stripe On going development via Python Stripe Library
โŒ Docker -
โŒ CI/CD Render Deployment Platform

django-ecomm-stripe-products-provisioning.mp4

Quick Start

๐Ÿ‘‰ Step 1 - Download the code from the GH repository (using GIT)

$ git clone https://github.com/app-generator/ecommerce-django-stripe.git
$ cd ecommerce-django-stripe

๐Ÿ‘‰ Step 2 - Create .env using provided env.sample

Add .env file in your projects root directory and add the following credentials

DEBUG=True
SECRET_KEY=
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
DOMAIN_URL=

๐Ÿ‘‰ Step 3 - Install dependencies

$ python -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt

๐Ÿ‘‰ Step 4 - Migrate DB & Start the APP

$ python manage.py migrate
$ python manage.py runserver

Visit http://localhost:8000 in your browser. The app should be up & running.


๐Ÿ‘‰ Step 5 - Access the products and initiate a payment

IMPORTANT: Make sure your Stripe account is running in TEST Mode and Use Test CC provided by Stripe:

  • CC Number: 4242 4242 4242 4242
  • Any data for the rest of the fields

Create a new Product

  • Go to products/templates/products directory
  • Create a new JSON file with data:
    • name: Used in product page & Cards
    • price: Used for payment
    • currency: Used for payment
    • info: used in cards
    • short_description: used in product page
    • full_description: used in product page
  • Create Media Files
    • Go to products/static/products
    • Create a directory using the same name as for JSON file
      • Create card.jpg: 500x335px
      • Create cover.jpg: 2100x1400px
  • Start or refresh the app
    • The new product should be listed in the home page
    • Product page is available at address:
      • http://127.0.0.1:8000/product/<SLUG>/ where the SLUG is the name of the JSON file

โœจ Load and create product from stripe

  • Go to Create Product route in Products dropdown [You must be a superuser]
  • On the left side there should be a button Get Products From Stripe this button will pull all the products associated with the stripe account. demo
    • There will be product list, you can create a product by clicking the Create button. demo
  • On the right side you will see the local product list and a button Edit.
    • You can edit a product from here. [ID is not editable] demo

Sample product page generated for Air ZOOM Pegasus, assets loaded from here


Django Stripe Sample - Air ZOOM Pegasus (sample Product


Homepage eCommerce cards

Django & Stripe Mini eCommerce - Open-Source Starter provided by AppSeed.


Codebase structure

The project has a simple structure, represented as bellow:

< PROJECT ROOT >
   |
   |-- products/__init__.py
   |-- products/
   |    |-- static/
   |    |    |-- <css, JS, images>         # CSS files, Javascripts files
   |    |
   |    |-- templates/
   |    |    |
   |    |    |-- includes/                 # Page chunks, components
   |    |    |    |-- navigation.html      # Top bar
   |    |    |    |-- sidebar.html         # Left sidebar
   |    |    |    |-- scripts.html         # JS scripts common to all pages
   |    |    |    |-- footer.html          # The common footer
   |    |    |
   |    |    |-- layouts/                  # App Layouts (the master pages)
   |    |    |    |-- base.html            # Used by common pages like index, UI
   |    |    |    |-- base-fullscreen.html # Used by auth pages (login, register)
   |    |    |
   |    |    |-- products/                        # Define your products here
   |    |    |    |-- nike-goalkeeper-match.json  # Sample product
   |
   |-- requirements.txt
   |
   |-- run.py
   |
   |-- ************************************************************************

Credits & Links



Django & Stripe Mini eCommerce - Free sample provided by AppSeed.

ecommerce-django-stripe-demo's People

Contributors

app-generator avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.