问题
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)
来源:https://stackoverflow.com/questions/36112273/disable-order-email-in-django-oscar