Total Posts: 31
I want to create by code, an order with products.
I did it with simple product.
it looks very well.
But when I add a simple product, that is actually linked to a configurable, then I can see only one item in the table sales_flat_order_item , while there shall be 2 (as when you do a real order of a simple linked to a configurable)
=> 1 item (the configurable)
=< 1 item (the simple product) with the parent_item_id set the the configurable above.
In the order, of course magento shows only one.
How to reproduce this?
Here is my code
//21454 is the simple product
$products = array(
\'21454\' => array(
\'qty\' => 1
$rowTotal = $_product->getPrice() * $product[\'qty\'];
$orderItem = Mage::getModel(\'sales/order_item\')
$subTotal += $rowTotal;
Note that I googled, and found some post, they are talking about options, but they show the options ID and have no idea how to get them.
And I do not understand while I should do that, as the simple product is already a specific option (or combination of option)