*** uc_order.admin.inc	2011-01-03 16:02:07.099259741 +0100
--- uc_order.admin.inc.new	2011-01-03 16:03:00.155259741 +0100
***************
*** 1375,1397 ****
      $form['products'] = tapir_get_table('op_products_edit_table');
      for ($i = 0; $i < $product_count; $i++) {
        $form['products'][$i]['remove'] = array(
          '#type' => 'checkbox',
          '#name' => "products[$i][remove]",
          '#theme' => 'uc_order_remove_product',
          '#parents' => array(),
          '#img_id' => $products[$i]->order_product_id,
!       );
!       $form['products'][$i]['order_product_id'] = array(
          '#type' => 'hidden',
          '#value' => $products[$i]->order_product_id,
          '#name' => "products[$i][order_product_id]",
          '#parents' => array(),
!       );
!       $form['products'][$i]['nid'] = array(
          '#type' => 'hidden',
          '#value' => $products[$i]->nid,
          '#name' => "products[$i][nid]",
          '#parents' => array(),
        );
        $form['products'][$i]['qty'] = array(
          '#type' => 'textfield',
--- 1375,1406 ----
      $form['products'] = tapir_get_table('op_products_edit_table');
      for ($i = 0; $i < $product_count; $i++) {
        $form['products'][$i]['remove'] = array(
+         'remove' => array(
            '#type' => 'checkbox',
            '#name' => "products[$i][remove]",
            '#theme' => 'uc_order_remove_product',
            '#parents' => array(),
            '#img_id' => $products[$i]->order_product_id,
!         ),
!         // hidden fields go here. if we don't add them the form does not work
!         'order_product_id' => array(
            '#type' => 'hidden',
            '#value' => $products[$i]->order_product_id,
            '#name' => "products[$i][order_product_id]",
            '#parents' => array(),
!         ),
!         'nid' => array(
            '#type' => 'hidden',
            '#value' => $products[$i]->nid,
            '#name' => "products[$i][nid]",
            '#parents' => array(),
+         ),
+         'data' => array(
+           '#type' => 'hidden',
+           '#value' => $products[$i]->data,
+           '#name' => "products[$i][data]",
+           '#parents' => array(),
+         ),
        );
        $form['products'][$i]['qty'] = array(
          '#type' => 'textfield',
***************
*** 1436,1447 ****
          '#parents' => array(),
          '#size' => 5,
        );
-       $form['products'][$i]['data'] = array(
-         '#type' => 'hidden',
-         '#value' => $products[$i]->data,
-         '#name' => "products[$i][data]",
-         '#parents' => array(),
-       );
      }
    }
    else {
--- 1445,1450 ----
