I have a module that takes a feed from another site and then imports orders into magento. The problem is that although orders are created properly and appear in Magento, they do not appear in the product order report.
It seems that the reason is that this report looks at the sales_flat_quote_item table to get the results, but there are no entries for my products. However, they display correctly in sales_flat _order_item.
The following is a shortened version of the code.
Any suggestions as to why I am not getting an entry in the flat_quote_item file?
Why is the Magento model used in the Ordered Products report using a quote table rather than an order table?
$quote = Mage::getModel('sales/quote')->setStoreId((string) $dataArray->StoreviewId);
if (is_object($product)) {
$product->setPrice(((string) $orderitem->Price) / $reverseRate);
$item = Mage::getModel('sales/quote_item');
$item->setQuote($quote)->setProduct($product);
$item->setData('qty', (string) $orderitem->Quantity);
$item->setCustomPrice((string) $orderitem->Price);
$item->setOriginalCustomPrice((string) $orderitem->Price);
$quote->addItem($item);
}