Hello,

Great work on this module. I am switching over to uc_ajax_cart and noticed that the upsell cart pane would disappear after ajax cart editing. uc_ajax_cart calls uc_cart_view() to render the output so it should work with all modules that provide cart panes. I have tracked down the problem to uc_upsell_core.inc in the uc_upsell_resolve_associates() function.

 //ORG CODE
function uc_upsell_resolve_associates(&$msg = '') {
  $config = uc_upsell_get_config();
  $dpath = $_GET['q'];

  // If this is the cart...
  if ($dpath == 'cart') {
    $context = 'pane';
    $is_block = FALSE;
  }

The problem is that $dpath != 'cart' when it is called by uc_ajax_cart. The dirty fix is to add the uc_ajax_cart path to the condition:

 //EDITED CODE
function uc_upsell_resolve_associates(&$msg = '') {
  $config = uc_upsell_get_config();
  $dpath = $_GET['q'];

  // If this is the cart...
  if ($dpath == 'cart' || $dpath == 'uc_ajax_cart/show-cart-view') {
    $context = 'pane';
    $is_block = FALSE;
  }

Although it would probably be best to pass a variable to the uc_upsell_resolve_associates() function to tell it what the context is. The function uc_upsell_cart_pane_content() triggers this one to render the pane so you could pass it there.

 // ORG CODE
function uc_upsell_cart_pane_content($data = '') {
  $related = uc_upsell_resolve_associates($data); // get related cart items (sets $msg too)
  return theme('pane_upsell', $related, $data);
}

BTW there is another problem in this function. $data is an array of cart items and is normally called $items in ubercart code. But uc_upsell_resolve_associates() expects pass by reference string &$msg which it then tries to modify. I believe $msg is just the title of the pane/block? I have temporarily changed the function to:

 // EDITED CODE
function uc_upsell_cart_pane_content($items) {
  $msg = '';
  $related = uc_upsell_resolve_associates($msg); // get related cart items (sets $msg too)
  return theme('pane_upsell', $related, $msg);
}

If you would like me to create a patch please let me know.