Hi everyone,
I'm very new to Django-Oscar. I am in the process of creating an online store that sells digital products only.
From a high-level point-of-view, the requirements are pretty basic. Users can basically buy any product and once checkout and payment succeeds, they get an email with a unique, one-time use only, expirable link in order to download the product(s) they bought.
The above use-case seems to be pretty common but I'm at a loss as to how to implement that on Django-Oscar. I find Django-Oscar very robust and flexible to handle any kind of e-commerce use-case out there knowing that you can easily override/extend any of the core functionalities of Django Oscar.
My dead end as of the moment:
I want to customize the Product model to include a FileField where I can attach the actual product (a downloadable PDF for example). Then, after that I wish to customize the checkout process so that I can generate the one-time download links and email it to the customer.
This code is from forks/catalogue/models.py...
from django.db import models
from oscar.apps.catalogue.abstract_models import AbstractProduct
class Product(AbstractProduct):
basic_file = models.FileField(upload_to='products/basic')
premium_file = models.FileField(upload_to='products/premium')
from oscar.apps.catalogue.models import *
This is the file structure...
.
├── conf
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── db.sqlite3
├── forks
│ ├── __init__.py
│ └── catalogue
│ ├── __init__.py
│ ├── admin.py
│ ├── config.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ └── __init__.py
│ ├── models.py
│ └── south_migrations
│ ├── ... lots of migration files here ...
│ └── __init__.py
├── manage.py
└── media
I tried using ./manage shell to import my customized model and this is what came out...
>>> from forks.catalogue.models import Product
... long stack trace here ...
RuntimeError: Conflicting 'product_product_options' models in application 'catalogue': <class 'oscar.apps.catalogue.models.P
roduct_product_options'> and <class 'forks.catalogue.models.Product_product_options'>.
I think I followed the documentation correctly but now I'm stuck and couldn't figure this out.
Can anyone help me with this?
Can you point me to a tutorial somewhere else that will help me implement what I need? I couldn't find much material in Oscar's official docs about customizing it for digital, downloadable products.
Thank you very much and hope to get answers here.
I'm using Django 1.7.1 on Python 2.7.9 by the way.
Noel