Disable order email in Django-oscar [closed]

2019-09-14 15:38发布

问题:

I built a simple e-commerce site with django-oscar.

After a successful order placement an email is sent to client regardless of settings. I found the code located at oscar/apps/customer/utils.py:Dispatcher.dispatch_order_messages

Is it possible to turn this behavior off?

回答1:

You should fork the checkout app (as described here) and override the handle_successful_order method of the OrderPlacementMixin. You can copy the code from the oscar app and simply comment out the line where the confirmation message is sent.

# self.send_confirmation_message(order, self.communication_type_code)