How to add edit link within add to cart form in ubercart drupal 7?
This is probably confusing due to UC's reliance on TAPIr to render the cart items. Anyway, you can modify data inside in the $form['items'] array to change the output of those elements. For example, if you wanted to add an edit link underneath the product description:

function MYMODULE_form_uc_cart_view_form_alter(&amp;$form, &amp;$form_state) {
  foreach($form['items'] as $key =&gt; $value) {
    //Check a TAPIr row for a product associated with an editable nid
    if(is_int($key) &amp;&amp; isset($value['nid']['#value']) &amp;&amp; isset($value['desc'])) {
      if(node_access('update', $value['#entity'], $user)) {
        $form['items'][$key]['desc']['#markup'] .= l('(EDIT)', 'node/'.$value['nid']['#value'].'/edit');
      }
    }
  }


There might be a cleaner way to do this, but I haven't thought about TAPIr in a while.