When I try to generate invoices, I get the following error message:

Fatal error: Call to a member function getParentItem() on a non-object in /home/design/public_html/app/design/adminhtml/default/default/template/sales/order/invoice/view/items.phtml on line 50

This has not always been the case. Can anyone help?

  • i'd like to keep the productname, about item id, i don't know which was the good one, in fact i don't know how to enter to sales_flat_order_item to know the old right item_id – john Oct 23 '14 at 7:48
  • You have changed something on that order where you're getting this order (like, for example a product is swapped out from the order & new invoice generated) and it's not been updated to sales_flat_invoice_item table.
  • Solution: Try updating the order_item_id field to point to the correct item in sales_flat_order_item

I have the same issue. Removing "->getParentItem()" helps to get rid of the error, but then it doesn't show the productname anymore. Strange thing that our newest orders don't have this error, but all older orders have it (from 2012 to oct. 2014).

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