I'm using an event observer which fires when user clicks on the 'Place Order' button in checkout flow. I want to capture the product details which are in the cart. Actually this moment order object has already created. If I can access order object it is more than enough.
I have tried the followings, but no luck.
I'm using the event checkout_submit_all_after
. And that event executes the following function in the observer.
public function galileo_booking_request(Varien_Event_Observer $observer)
{
// $product = $observer->getData('product');// returns null object
// $order = $observer->getEvent()->getOrder();// returns null object
$request = $observer->getEvent()->getRequest()->getParams();// returns null object
Mage::log($request['product'],null,'eventoberver.log',true);
}
Best Answer
The observer receives as a parameter the order (or orders for multishipping) and the quote. Here is how you can get them
If it doesn't work for you for the order, try with the quote. After getting the quote object your can loop through the items.