Probably an odd, backwards sounding request, but I would like to keep related products in the upsell location even if they're already in the cart.

The module seems to do a very effective job of filtering such products from the related products block.

I've peered through the module but I'm not catching where they're being filtered

Comments

sansui’s picture

Poking around, at line 197 of uc_upsell_core.inc

  // Remove found nids with filter and already sought nids, make them unique
  $ary = uc_upsell_get_types_array($related);
  $ary = uc_upsell_filter_types($ary);
  $ary = array_diff(array_keys($ary), $filter, $sought);
  $ary = array_unique($ary);

Changed array_diff to array_merge and so far this seems to do the trick. Items already in the cart continue to show in the upsell block (for easy access to buy additional colors/variations of same product).