后在Magento新的顺序执行PHP [英] Execute PHP after new Order in Magento

查看:124
本文介绍了后在Magento新的顺序执行PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出在那里我可以在一些PHP code降至通知我们使用(Solve360结合),一个新的订单已放置在一个CRM和一个事件应创建(API)来履行订单。

I'm trying to figure out where I could drop in some PHP code to notify a CRM we are using (Solve360) that a new order has been placed, and that an event should be created (API) to fulfill the order.


  1. 订购产品

  2. 结帐

  3. 完整Checkout的放大器;捕获CC

  4. 侧通知CRM

  5. 完成

不知道从哪里开始,但我不得不做出一些小的调整来解决量子网关支付处理工作。在该模块似乎为订单(电子邮件,AMT,细节)的对象是可用的。不过现在看来,这将是相当脏在里面插入更多的PHP code。

Not sure where to start, but I have had to make some small tweaks to fix the Quantum Gateway payment processor to work. In that module it appears that the objects for the order (email, amt, details) were available. However it seems it would be quite 'dirty' to insert more PHP code in there.

想法?

PHP 5.2.x和放大器; Magento的1.4.x的

PHP 5.2.x & Magento 1.4.x

推荐答案

你应该做的是钩成为一个新放置的顺序触发Magento的事件,并与你正在寻找的功能定义自己的类。使用事件/观察员获取如何设置观察家认为自定义的Magento(你需要创建自己的这个模块)。

What you should do is hook into the Magento event that is fired for a newly placed order and define your own class with the functionality you are looking for. See Customize Magento using Event/Observer for how to set up observers (you'll need to create your own module for this).

您想监听的事件是 sales_order_place_after ,当你宣布一个观测它,任何顺序放置后,您的code将被调用。

The event you want to listen for is sales_order_place_after, and when you declare an observer for it, your code will be called after any order is placed.

希望帮助!

谢谢,

这篇关于后在Magento新的顺序执行PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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