I have this code: http://pastebin.com/iFwyKM7G
Inside an event-observer class which executes after the customer registered. It creates an order automatically and it works for simple products. However I cannot figure out for the life of me how to make it work with Bundled product!
How can I make this work with a bundled product? What extra things do i need to set? Since then i figured out that i need these options:
$products = array(
'2' => array(
'qty' => 1,
'bundle_option' => array(
2 => 2,
1 => 1,
),
'bundle_option_qty' => array(
2 => 1,
1 => 1,
),
),
);
yet i dont know what function i need t ouse to add that options to my bundle product.
Best Answer
I DID IT!
I changed my code to the following:
And it works! thought the customer doesn't get notified. which iam trying to figure out now.