=== modified file 'uc_cart/uc_cart.module'
--- uc_cart/uc_cart.module	2009-09-21 14:13:04 +0000
+++ uc_cart/uc_cart.module	2009-09-22 01:50:14 +0000
@@ -894,6 +894,9 @@
     foreach ($items as $key => $item) {
       uc_cart_add_item($item->nid, $item->qty, $item->data, $uid, FALSE, FALSE);
     }
+
+    // Rebuild the items hash
+    uc_cart_get_contents(NULL, 'rebuild');
   }
 }
 
@@ -1561,6 +1564,9 @@
         module_invoke($item['module'], 'update_cart_item', $item['nid'], unserialize($item['data']), $item['qty']);
       }
     }
+
+    // Rebuild the items hash
+    uc_cart_get_contents(NULL, 'rebuild');
   }
 }
 

=== modified file 'uc_cart_links/uc_cart_links.pages.inc'
--- uc_cart_links/uc_cart_links.pages.inc	2009-07-21 14:29:21 +0000
+++ uc_cart_links/uc_cart_links.pages.inc	2009-09-22 01:55:11 +0000
@@ -31,6 +31,7 @@
 
   // Split apart the cart link on the -.
   $actions = explode('-', drupal_strtolower($arg1));
+  $rebuild_cart = FALSE;
 
   foreach ($actions as $action) {
     switch (drupal_substr($action, 0, 1)) {
@@ -84,6 +85,7 @@
             }
           }
           uc_cart_add_item($p['nid'], $p['qty'], $p['data'] + module_invoke_all('add_to_cart_data', $p), NULL, $msg, FALSE);
+          $rebuild_cart = TRUE;
         }
         break;
 
@@ -112,6 +114,11 @@
         }
         break;
     }
+
+    // Rebuild the cart cache if necessary.
+    if ($rebuild_cart) {
+      uc_cart_get_contents(NULL, 'rebuild');
+    }
   }
 
   if (variable_get('uc_cart_links_track', TRUE)) {
@@ -128,4 +135,3 @@
 
   drupal_goto();
 }
-

=== modified file 'uc_product/uc_product.module'
--- uc_product/uc_product.module	2009-09-21 14:47:29 +0000
+++ uc_product/uc_product.module	2009-09-22 01:55:56 +0000
@@ -1207,8 +1207,6 @@
     db_query("UPDATE {uc_cart_products} SET qty = %d, changed = %d WHERE nid = %d AND cart_id = '%s' AND data = '%s'", $qty, time(), $nid, $cid, serialize($data));
   }
 
-  // Rebuild the items hash
-  uc_cart_get_contents(NULL, 'rebuild');
 }
 
 /**
@@ -1412,6 +1410,8 @@
  */
 function uc_catalog_buy_it_now_form_submit($form, &$form_state) {
   $form_state['redirect'] = uc_cart_add_item($form_state['values']['nid'], 1,  module_invoke_all('add_to_cart_data', $form_state['values']), NULL, variable_get('uc_cart_add_item_msg', TRUE));
+  // Rebuild the cart cache.
+  uc_cart_get_contents(NULL, 'rebuild');
 }
 
 /**
@@ -1517,6 +1517,8 @@
  */
 function uc_product_add_to_cart_form_submit($form, &$form_state) {
   $form_state['redirect'] = uc_cart_add_item($form_state['values']['nid'], $form_state['values']['qty'],  module_invoke_all('add_to_cart_data', $form_state['values']), NULL, variable_get('uc_cart_add_item_msg', TRUE));
+  // Rebuild the cart cache.
+  uc_cart_get_contents(NULL, 'rebuild');
 }
 
 /**

=== modified file 'uc_product_kit/uc_product_kit.module'
--- uc_product_kit/uc_product_kit.module	2009-09-21 14:47:29 +0000
+++ uc_product_kit/uc_product_kit.module	2009-09-22 01:56:59 +0000
@@ -774,6 +774,8 @@
   $node = node_load($form_state['values']['nid']);
   drupal_set_message(t('<strong>@product-title</strong> added to <a href="!url">your shopping cart</a>.', array('@product-title' => $node->title, '!url' => url('cart'))));
   $form_state['redirect'] = uc_cart_add_item($form_state['values']['nid'], $form_state['values']['qty'], $form_state['values']);
+  // Rebuild the items hash
+  uc_cart_get_contents(NULL, 'rebuild');
 }
 
 /**
@@ -853,6 +855,9 @@
     }
   }
   $form_state['redirect'] = uc_cart_add_item($form_state['values']['nid'], 1, $form_state['values'], NULL, variable_get('uc_cart_add_item_msg', TRUE));
+
+  // Rebuild the cart cache.
+  uc_cart_get_contents(NULL, 'rebuild');
 }
 
 /******************************************************************************
@@ -899,6 +904,9 @@
       uc_cart_add_item($product->nid, $product->qty * $qty, $data +  module_invoke_all('add_to_cart_data', $kit_data['products'][$product->nid]), NULL, FALSE, FALSE);
     }
 
+    // Rebuild the items hash
+    uc_cart_get_contents(NULL, 'rebuild');
+
     return array(array('success' => FALSE, 'silent' => TRUE, 'message' => ''));
   }
 }

