I am having puchased item id and I need to grab order details in magento 1 Can anybody please help?
2 Answers
You can do it by magento way:
$orderItem = Mage::getModel('sales/order_item')->load(259283);
echo $orderItem->getOrderId();
ok I got it.. by this
SELECT order_id FROM `sales_flat_order_item` WHERE `item_id` = 259283
-
why you want to write the sql this way , Magento have its own predefined getters Commented Jun 12, 2018 at 6:07