Introduction
Oscar is a domain-driven e-commerce framework for Django. Rather than providing a fixed storefront, it gives developers a set of customizable e-commerce building blocks — catalog, checkout, basket, offers, and shipping — that can be extended or replaced to fit specific business requirements.
What Oscar Does
- Manages product catalogs with categories, attributes, variants, and stock records
- Provides a multi-step checkout flow with address handling and order placement
- Implements a flexible offers and voucher engine for promotions and discounts
- Handles basket management, wishlists, and saved-for-later functionality
- Integrates with payment gateways via a pluggable payment interface
Architecture Overview
Oscar follows Django's app-based architecture. Each domain (catalog, checkout, basket, shipping, offers, customer) is a separate Django app with models, views, and templates. The framework uses a forking pattern: developers can fork any Oscar app into their project to override models, views, or templates without modifying Oscar's source. This allows deep customization while still receiving upstream updates for non-forked components.
Self-Hosting & Configuration
- Install via pip and add Oscar's apps to your Django project's INSTALLED_APPS
- Run migrations and the oscar_populate_countries management command for initial data
- Fork individual Oscar apps into your project to customize models or business logic
- Configure payment backends, shipping methods, and tax strategies in settings
- Deploy as a standard Django application with your preferred WSGI/ASGI server
Key Features
- App-forking customization model that allows overriding any component without modifying Oscar's source
- Flexible offers engine supporting percentage, fixed amount, multibuy, and shipping discount types
- Multi-currency and multi-language support for international storefronts
- Dashboard admin interface for managing products, orders, offers, and customer accounts
- Extensive test coverage and documentation covering common e-commerce patterns
Comparison with Similar Tools
- Saleor — GraphQL-first headless commerce in Python; Oscar is tightly integrated with Django templates and views
- Shuup — Django e-commerce with marketplace features; Oscar focuses on single-store customization depth
- PrestaShop — PHP-based with its own admin; Oscar leverages the full Django ecosystem
- Reaction Commerce — Node.js headless platform; Oscar is Python/Django-native
- Solidus — Ruby on Rails commerce; Oscar provides a similar domain-driven approach for the Django ecosystem
FAQ
Q: What is app forking in Oscar? A: App forking copies an Oscar app (e.g., oscar.apps.catalogue) into your project so you can modify its models, views, or templates. Oscar's tooling handles the import redirection.
Q: Does Oscar support headless/API-first setups? A: Oscar includes django-oscar-api, a companion package that exposes RESTful endpoints for catalog, basket, and checkout operations.
Q: Can Oscar handle marketplace or multi-vendor scenarios? A: Oscar's core is single-vendor, but the partner/fulfillment model supports multiple stock sources. Full marketplace features require custom extensions.
Q: What payment gateways does Oscar support? A: Oscar provides a pluggable payment interface. Community packages exist for Stripe, PayPal, Adyen, and other providers.