I'm working in e-shop project using
THIRD_PARTY_APPS = [
INSTALLED_APPS = THIRD_PARTY_APPS + PROJECT_APPS + [
] + get_core_apps(
from oscar.app import Shop
# from apps.checkout.app import application as checkout_app
from cashondelivery.app import application as checkout_app
checkout_app = checkout_app
application = ApplicationShop()
There are two ways for integrate cash on delivery in
Override checkout application:
In this case is necessary override checkout templates because by default
Oscar don't or can't get the
cashondelivery checkout templates, at least
payment_details. So, first you need override these template file and after create an app and inside it add a
app.py file where you override the checkout application as
cashondelivery documentation says.
Create a custom view and checkout app:
You can see in
django-oscar-paypal integration package a sandbox example for integrate
You can see in this package that they use a checkout app for replace the defaul checkout app; inside this app they override
view.py file and
app.view file; override templates and override
So, we can do the same for
a. Create a new application called
checkout inside the
apps application if you want, or some like you. This application only will contain the views and application file.
b. In views file we'll put the
cash-on-delivery views file, now it is in sanbox folder.
c. In app file inside checkout we declarate the checkout application:
from oscar.apps.checkout import app
from .views import PaymentDetailsView
class CheckoutApplication(app.CheckoutApplication): payment_details_view = PaymentDetailsView
application = CheckoutApplication()
d. Finally, we declarate our checkout app as default checkout app as documentation says.
e. We have ensure that the application override default check out application, in settings:
INSTALLED_APPS = + get_core_apps( [ 'apps.checkout', 'apps.shipping' ] )
You can now pay with cash on delivery method in your Oscar project.
We recommend use the second way because enable you use more than one method for payment.