1

I need to create a module which can allow a user to change the string used on the front end for delivery methods and use existing delivery methods from another module. I've got a decent idea of how to the conversion and everything, but I don't know what observer event I should be using to catch the order once it's been submitted. Does anyone know which one will let me catch the order before it's placed?

0

The event that is dispatch right before Magento saved the order is: sales_model_service_quote_submit_before

Mage::dispatchEvent('sales_model_service_quote_submit_before', array('order'=>$order, 'quote'=>$quote));

You can also use: sales_order_place_before and sales_order_place_after where you know if the order pass payment method.

Mage::dispatchEvent('sales_order_place_before', array('order'=>$this));

Using this events, you can set info in the order but you should not execute $order->save() because this is executed by Magento system in a transactions.

| improve this answer | |
  • 1
    Great, thanks for the help. Also thanks for the mention about $order->save(), hadn't considered that – David Morning Oct 13 '14 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.