Disable order email in Django-oscar [closed]

2019-09-14 15:50发布

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条回答
贼婆χ
2楼-- · 2019-09-14 16:14

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)
查看更多
登录 后发表回答