how to get order deatils by invoice id? I need to search order details by invoice id. Where to change this one?

1 Answer 1

$invoice = Mage::getModel('sales/order_invoice')->load($id);
//or if you have the long increment id: `100000401`
//$invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($id);

$order = $invoice->getOrder();

Then you can access the order data from the $order variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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