Magento: Obtain Id for order, listening to the event checkout_onepage_controller_success_action

后端 未结 4 1934
野的像风
野的像风 2021-01-15 16:24

When I look at the event checkout_onepage_controller_success_action and works, but I can not get the Id of the newly created order.

Anyone have any idea

4条回答
  •  我在风中等你
    2021-01-15 16:53

    The Onepage Checkout controller in the Magento version 1.4.1 is not updated to have functions that can obtain the Order ID and thus you cant have the order object and data from the event observer. To have this working in Magento 1.4.1 simply update your OnepageController with the necessary functions.

    The best approach would be to create your own module and override the core controller.

    Add this in the config xml of your module so that your controller is called before the core OnepageController.

    standardMyCompany_MyModule
    

    Hope this helps

提交回复
热议问题