在我的自定义模块中,我想在结帐流程的各个阶段完成后采取一些措施。我正在使用Magento事件调度系统来实现这一目标。不幸的是,核心产品中的事件调度系统似乎有点杂乱无章。 一个结账阶段是用户输入他们的账单地址。当使用单页结帐方法时,我可以拥有该事件的观察者:
controller_action_postdispatch_checkout_onepage_saveBilling
我不确定这是否是表示帐单邮寄地址的最佳事件,但似乎工作正常。
使用多重结账结账流程时,我看不到可以收听的相关事件。结算地址和付款方式在同一结帐阶段。我能提出的最相关的事件是:
controller_action_postdispatch_checkout_multishipping_overview
也会在下订单时触发。
有更好的方法吗?
谢谢。
答案 0 :(得分:1)
Log and grep,我的朋友,log和grep :)我在完成Multi-Shipping结帐流程时记录了所有事件,这里是货物转储。
如果感兴趣的是多次触发哪些事件以及按照什么顺序,则不会故意重复删除列表:
controller_action_predispatch_checkout_multishipping_index controller_action_postdispatch_checkout_multishipping_index controller_action_predispatch_checkout_multishipping_addresses controller_action_layout_render_before_checkout_multishipping_addresses controller_action_postdispatch_checkout_multishipping_addresses controller_action_predispatch_checkout_multishipping_addressesPost checkout_type_multishipping_set_shipping_items controller_action_postdispatch_checkout_multishipping_addressesPost controller_action_predispatch_checkout_multishipping_shipping controller_action_layout_render_before_checkout_multishipping_shipping controller_action_postdispatch_checkout_multishipping_shipping controller_action_predispatch_checkout_multishipping_shippingPost checkout_controller_multishipping_shipping_post controller_action_postdispatch_checkout_multishipping_shippingPost controller_action_predispatch_checkout_multishipping_billing controller_action_layout_render_before_checkout_multishipping_billing controller_action_postdispatch_checkout_multishipping_billing controller_action_predispatch_checkout_multishipping_overview controller_action_layout_render_before_checkout_multishipping_overview controller_action_postdispatch_checkout_multishipping_overview controller_action_predispatch_checkout_multishipping_overviewPost checkout_type_multishipping_create_orders_single controller_action_postdispatch_checkout_multishipping_overviewPost controller_action_predispatch_checkout_multishipping_success checkout_multishipping_controller_success_action controller_action_layout_render_before_checkout_multishipping_success controller_action_postdispatch_checkout_multishipping_success