Git Product home page Git Product logo

ecommerce's Introduction

edX E-Commerce Service Travis Coveralls

This repository contains the edX E-Commerce Service, which relies heavily on django-oscar, as well as all frontend and backend code used to manage edX's product catalog and handle orders for those products.

Prerequisites

  • Python 2.7.x (not tested with Python 3.x)
  • gettext
  • npm

Getting Started

Most commands necessary to run and develop the ecommerce service can be found in the included Makefile.

  1. Install the Python/Node/Bower requirements for local development:

    $ make requirements
    

Note: If you want to install only the production requirements run pip install -r requirements/production.txt.

  1. Setup the database:

    $ make migrate
    
  2. Populate the countries tables (used for storing addresses):

    $ python manage.py oscar_populate_countries
    
  3. Run the development server:

    $ make serve
    

Django Debug Toolbar is disabled by default. Enable it by setting the environment variable ENABLE_DJANGO_TOOLBAR.

Alternatively, you can launch the server using:

$ ENABLE_DJANGO_TOOLBAR=1 make serve

Asset Pipeline

Static files are managed via django-compressor and RequireJS (and r.js) are used to manage JavaScript dependencies. django-compressor compiles SASS, minifies JavaScript, and handles naming files to facilitate cache busting during deployment.

Both tools should operate seamlessly in a local development environment. When deploying to production, call make static to compile all static assets and move them to the proper location to be served.

When creating new pages that utilize RequireJS dependencies, remember new modules to build.js.

NOTE: The static file directories are setup such that the build output directory of r.js is read before checking for assets in ecommerce\static\. If you run make static or r.js locally (which you should not need to), make sure you delete ecommerce/static/build or run make static before continuing with development. If you do not all changes made to static files will be ignored.

Feature Switches

This app uses Waffle to manage feature gating/switching. Switches can be managed via Django admin. The following switches exist:

Name Functionality
user_enrollments_on_dashboard Display a user's current enrollments on the dashboard user detail page
publish_course_modes_to_lms Publish prices and SKUs to the LMS after every course modification
ENABLE_CREDIT_APP Enable the credit checkout page from where student's can purchase credit courses.

Analytics

To use google analytics for specific events e.g., button clicks, you need to add the segment key into the settings file:

SEGMENT_KEY = 'your segment key'

Credit

To enable custom credit checkout page, please add the following waffle switch:

ENABLE_CREDIT_APP

Testing

To run the unit test suite followed by quality checks, run:

$ make validate

Acceptance Testing

For instructions on how to run the acceptance tests, please consult the README file located in the acceptance tests README.

Documentation ReadtheDocs

License

The code in this repository is licensed under the AGPL unless otherwise noted. Please see LICENSE.txt for details.

How To Contribute

Contributions are welcome. Please read How To Contribute for details. Even though it was written with edx-platform in mind, these guidelines should be followed for Open edX code in general.

Reporting Security Issues

Please do not report security issues in public. Please email [email protected].

Mailing List and IRC Channel

You can discuss this code on the edx-code Google Group or in the #edx-code IRC channel on Freenode.

ecommerce's People

Contributors

clintonb avatar nickersoft avatar feanil avatar awais786 avatar stephensanchez avatar maxrothman avatar zubair-arbi avatar dianakhuang avatar

Watchers

James Cloos avatar Janus 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.