I would like to add some products to my cart while I am on checkout process. The cart appears to be empty at the time. I want to make a selection of some add-on products on the checkout process.
I created my own custom checkout pane(it's a form). Also a submit function.
There are "commerce_line_items" in the order object, but then I get an error that says my entity is missing bundle. There is also 'commerce_order_total' that includes the totals? so I can't just edit the object/array?
This is how I create my line item:
$line_item = commerce_product_line_item_new($product, 1, $order->order_id);
This is how I am trying to add it to my order:
$order->commerce_line_items['und'][] = array('line_item_id' => $line_item->line_item_id);