Disable order email in Django-oscar [closed]

妖精的绣舞 提交于 2019-12-25 07:05:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!