Magento的“继续结帐"活动? [英] 'Proceed to Checkout' Event for Magento?

查看:110
本文介绍了Magento的“继续结帐"活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始组装一个Magento模块,该模块绕过整个Magento结帐流程,而是通过XML-RPC将购物车详细信息发送给第三方履行公司.

I've just started putting together a Magento module which bypasses the whole Magento checkout process and instead sends the cart details to a 3rd party fulfilment company via XML-RPC.

无法快速到达任何地方,可以使用一些指导.我的理解是,我应该基于由结帐触发的事件,使用观察者创建模块.麻烦的是,我无法确定会发生什么事件,我已经遍历了这里的全部清单;

Not getting anywhere fast and could use a bit of guidance. My understanding is that I should create the module with an observer based on the event triggered by proceeding to checkout. Trouble is I can't work out which event that would be, I've been through the whole massive list here;

http://www.nicksays.co.uk/magento_events_cheat_sheet/

我已经尝试过了

checkout_submit_all_after-成功处理订单后触发

checkout_submit_all_after - fires after order processed successfully

checkout_cart_add_product_complete-将产品添加到购物车后触发

checkout_cart_add_product_complete - fires after product added to cart

checkout_cart_save_before-产品添加到购物车后触发

checkout_cart_save_before - fires after product added to cart

checkout_type_onepage_save_order-根本无法触发

checkout_type_onepage_save_order - can't get this to fire at all

checkout_onepage_controller_success_action-成功处理订单后触发

checkout_onepage_controller_success_action - fires after order processed successfully

我不知道这是否意味着我必须创建一个自定义事件,或者是否有与我正在做的事情完全不同且更好的选择.构建和发送XML时,我会提出另一个问题(开始意识到我可能会在这里忙得不可开交),但是那里的所有技巧也非常感谢.

I don't know if this means I'll have to create a custom event or if there is an entirely different and much better alternative to what I'm doing. Building and sending the XML I will leave to another question (starting to realise I may have my hands pretty full here) but any tips there gratefully appreciated too.

感谢您的帮助.

推荐答案

controller_action_predispatch_checkout_onepage_index应该是您要查找的事件.所有控制器都继承preDispatch方法,该方法将触发预调度的一般事件,并根据请求的操作路径触发特定事件.所需的控制器位于checkout模块中,称为onepage,默认操作为index.

controller_action_predispatch_checkout_onepage_index should be the event you're looking for. All controllers inherit the preDispatch method which fires a generic event for predispatch, and a specific event based on the requested action path. The controller you want lives in the checkout module and is called onepage with a default action of index.

查看Mage_Core_Controller_Varien_Action::preDispatch()以查看相关代码

这篇关于Magento的“继续结帐"活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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