Hi people,
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??
Use magento-1.4.1.0
Thanks
Hi people,
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??
Use magento-1.4.1.0
Thanks
That event probably gets called before the action itself executes. Can you use sales_order_save_after
instead?
EDIT: Here's your ID code. In your observer:
public function setLinkStatus($observer) {
$order = $observer->getEvent()->getOrder();
$id = $order->getId();
// do something useful
}