With UC Beta2, the "Change cart item titles into edit links for their associated nodes." does not work. With the way that uc_cart_view_form is structured I found I was only able to alter the title by changing it within 'desc' which contains all of the output, including any attributes.

I got this working by changing

$form['items'][$i]['title']['#value'] = $title;

to

$form['items'][$i]['desc']['#value'] = preg_replace('/(<a([^>]+)>)(.*?)(<\/a>)/is', $title, $form['items'][$i]['desc']['#value']);

in uc_node_checkout_form_alter().

It sure would be nice if there was a hook_cart_item_title() in the same spirit as hook_cart_item_description().

Comments

rszrama’s picture

Assigned: Unassigned » rszrama
Status: Active » Fixed

Also should be fixed in the latest code in CVS for DRUPAL-6--2.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.