I am trying to get quote elements that have a specific parent_item_id
Actually, I have an instance of the parent element of the quote that I got like this:
$parentQuoteItem = Mage::getModel("sales/quote_item")->load($quoteItemId);
How can I extract the children of this quote element?
I tried calling the getChildren () method, but unfortunately it gave an empty array:
$parentQuoteItem->getChildren()
Any help is appreciated :)
--------------- UPDATE ------------------------ -----
I solved the problem with the following code:
$aChildQuoteItems = Mage::getModel("sales/quote_item") ->getCollection() ->setQuote($mQuote) ->addFieldToFilter("parent_item_id", $quoteItemId);
Gabriel spiteri
source share