在Django-oscar中禁用订单电子邮件 [英] Disable order email in Django-oscar

查看:43
本文介绍了在Django-oscar中禁用订单电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用django-oscar建立了一个简单的电子商务网站.

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

成功下订单后,无论设置如何,都会向客户发送一封电子邮件.我在 oscar/apps/customer/utils.py:Dispatcher.dispatch_order_messages

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

是否可以关闭此行为?

推荐答案

您应该派发 checkout 应用(如

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)

这篇关于在Django-oscar中禁用订单电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆