本文介绍了更新有关事件checkout_onepage_controller_success_action的确认电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,我想知道您是否可以帮助我..

I’m facing an issue and i’m wondering if you could help me with it ..

我需要在以下事件上更新我的确认电子邮件:checkout_onepage_controller_success_action,并仅在内部完成更新后才发送.

I need to update my confirmation email on the following event: checkout_onepage_controller_success_action, and send it only after my updates are done inside it..

问题是我找不到在代码中发送确认电子邮件的位置吗?可能不是活动的观察者吗?

Problem is I don’t find where is sent the confirmation email in the code ? and it’s probably not an observer on an event no ?

也许您可以为我提供帮助,因为我需要用一些重要的信息来更新此电子邮件,这些信息只有在我收到付款确认后才能得到..

Maybe you could help me with it because i need to update this email with some important Information that I only got after I have a payment confirmation ..

无论如何,我希望您星期天愉快,也许您将能够帮助我,

Anyway I wish you a nice sunday and maybe you will be able to help me,

最适合您不同项目的

Anselme

PS我正在使用magento 1.4.0.2

PS i'm using magento 1.4.0.2

推荐答案

在类Mage_Sales_Model_Order中,有一个函数sendNewOrderEmail可以为该订单触发电子邮件.这由结帐模型(Mage_Checkout_Model_Type_Onepage,在我的安装程序中的第741行)调用.根据您要查找的信息类型,您可能无法保证在框架要发送电子邮件时此信息可用.

Inside of the class Mage_Sales_Model_Order, there is a function sendNewOrderEmail which fires the email for the order. This is called by the checkout model (Mage_Checkout_Model_Type_Onepage, line 741 on my install). Depending on what type of information you are looking for, you may not be able to guarantee that this information is available at the time that the framework wants to send the email.

在这种情况下,您可以覆盖sales_order类并更改该函数的内容.您可以覆盖该功能以检查是否存在必要的数据,而不是立即发送电子邮件,并仅在数据可用时才发送.如果数据不可用,您希望将其添加到某种作业队列中,以便可以定期检查其是否有正确的信息,并在必要时发送.

If that is the case, you could override the sales_order class and change the contents of that function. Rather than sending the email immediately, you could override the function to check for the presence of the necessary data, and send it only if the data is available. If the data is not available, you would want to add it to some sort of job queue so that it could be periodically checked for the right information and sent when necessary.

覆盖sales_order类本身的原因是,在框架中还有其他几个地方调用了sendNewOrderEmail函数,并将其更改为g

The reason for overriding the sales_order class itself is that there are several other places in the framework where the sendNewOrderEmail function is called, and changing it g

这篇关于更新有关事件checkout_onepage_controller_success_action的确认电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 10:38