=== modified file 'uc_attribute/uc_attribute.module'
--- uc_attribute/uc_attribute.module	2009-05-26 13:10:31 +0000
+++ uc_attribute/uc_attribute.module	2009-06-02 06:40:44 +0000
@@ -257,6 +257,9 @@ function uc_attribute_theme() {
  * Implementation of hook_form_alter().
  *
  * Attach option selectors to the form with the "Add to Cart" button.
+ * 
+ * This function also handles selecting attributes for products added to orders
+ * manually.
  */
 function uc_attribute_form_alter(&$form, &$form_state, $form_id) {
   if (strpos($form_id, 'add_to_cart_form') || strpos($form_id, 'add_product_form')) {

=== modified file 'uc_order/uc_order.module'
--- uc_order/uc_order.module	2009-05-07 20:12:13 +0000
+++ uc_order/uc_order.module	2009-06-02 07:34:48 +0000
@@ -1061,22 +1061,13 @@ function uc_order_user_load($order) {
  * Function to save a product to an order.
  */
 function uc_order_product_save($order_id, $product) {
-  if (!$product->order_product_id) {
-    db_query("INSERT INTO {uc_order_products} (order_id, nid, qty, cost, price, title, manufacturer, model, weight, data) "
-      ."VALUES (%d, %d, %d, %f, %f, '%s', '%s', '%s', %f, '%s')", $order_id, $product->nid, $product->qty,
-       $product->cost, $product->price, $product->title, $product->manufacturer, $product->model, $product->weight, serialize($product->data));
-    $product->order_product_id = db_last_insert_id('uc_order_products', 'order_product_id');
-  }
-  else {
-    db_query("UPDATE {uc_order_products} SET order_id = %d, nid = %d, qty = %d, cost = %f, price = %f, title = '%s', manufacturer = '%s', model = '%s', weight = %f, data = '%s' WHERE order_product_id = %d",
-      $order_id, $product->nid, $product->qty, $product->cost, $product->price, $product->title, $product->manufacturer, $product->model, $product->weight, serialize($product->data), $product->order_product_id);
-    if (!db_affected_rows()) {
-      db_query("INSERT INTO {uc_order_products} (order_id, nid, qty, cost, price, title, manufacturer, model, weight, data) "
-        ."VALUES (%d, %d, %d, %f, %f, '%s', '%s', '%s', %f, '%s')", $order_id, $product->nid, $product->qty,
-         $product->cost, $product->price, $product->title, $product->manufacturer, $product->model, $product->weight, serialize($product->data));
-      $product->order_product_id = db_last_insert_id('uc_order_products', 'order_product_id');
-    }
-  }
+  // Skip?
+  if (isset($product->skip_save) && $product->skip_save == TRUE) return;
+  // !$id ? Insert : Update
+  $key = empty($product->order_product_id) ? NULL : 'order_product_id';
+  // @TODO order_id should be in the object by this point.
+  $product->order_id = $order_id;
+  return drupal_write_record('uc_order_products', $product, $key);
 }
 
 /**

=== modified file 'uc_product_kit/uc_product_kit.module'
--- uc_product_kit/uc_product_kit.module	2009-05-29 14:42:03 +0000
+++ uc_product_kit/uc_product_kit.module	2009-06-02 07:28:11 +0000
@@ -848,6 +848,31 @@ function uc_product_kit_cart_item($op, &
   }
 }
 
+function uc_product_kit_form_uc_order_add_product_form_alter(&$form, &$form_state) {
+  if (!isset($form['products'])) {
+    foreach (node_load($form['nid']['#value'])->products as $product) {
+      $products[$product->nid] = array();
+    }
+    $form = array_merge(array('products' => $products), $form);
+  }
+}
+
+function uc_product_kit_order_product_alter(&$product, $order) {
+  if ($product->type !== 'product_kit') return;
+  // Have to save each individual product if this is a kit.
+  foreach ($product->products as $kit_product) {
+    $kit_product->price = $kit_product->sell_price;
+    // Load all the attributes/discounts/etc as if we were adding it to the 
+    // cart...
+    $kit_product->data = module_invoke_all('add_to_cart_data', $_POST);
+    $kit_product->data['kit_id'] = $product->nid;
+    module_invoke_all('cart_item', 'load', $kit_product);
+    // Save the individual item to the order.
+    uc_order_product_save($order->order_id, $kit_product);
+  }
+  // Don't save the base kit node, though.
+  $product->skip_save = TRUE;
+}
 /**
  * Implementation of Ubercart's hook_cart_display().
  *

