Magento-发送不同订单状态的电子邮件 [英] Magento - Send emails for different order status

查看:240
本文介绍了Magento-发送不同订单状态的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用magento建立在线商店.

I am currently building an online store using magento.

下订单后,客户会自动收到订单确认".但是,我想先检查一下是否可以处理此订单(由于多种原因),然后再发送一封订单接受"电子邮件,说我们接受了开始处理的订单.

After placing an order, customers automatically receive an "order confirmation". However, I would like to check first first if this order can be processed (for several reasons) and after that, send an "order acceptance" email saying that we accepted the order starting to process it.

我不敢相信magento缺少此功能.

I cant believe that magento lacks this feature.

但是我还需要发送其他几封电子邮件:

However I also need to send several other emails:

  • 收到付款时
  • 何时需要订购更多的产品
  • 当我们收到客户的其他产品时.

有人有什么线索吗,这样的事情怎么实现?

Does anybody have any clue, how something like this can be accomplished?

提前谢谢!

推荐答案

您知道php上具有此功能的任何其他电子商务平台吗?

do you know any other e-commerce platform on php that has this feature ?

您当然可以

  1. 覆盖Mage_Checkout_Model_Type_Onepage中的saveOrder()方法,以调用此电子邮件的发送方式
  2. 在定义此方法的Mage_Sales_Model_Order中覆盖sendNewOrderEmail()方法
  3. 覆盖Mage_Sales_Helper_Data中的canSendNewOrderEmail()方法,如果允许发送此邮件,该方法将处理验证
  4. 将用于控制帮助方法的条件的sales_email/order/enabled配置值编辑为在管理页面中为false

此后,您必须在您的扩展观察程序中实现自己的基于状态的电子邮件发送.您可以观察save_order_after事件来执行此操作,并且可以调用与可从订单对象访问的方法相同的方法

After that you have to implement your own status based e-mail sending in your extension observer . You can observe the save_order_after event to do that and you can call for the same method as it is accessible from order object

这篇关于Magento-发送不同订单状态的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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