1

The code was converted from existing D6 'Simple package tracking' module to D7. it is supposedly show 'tracking number' with 'delete' in D7 Ubercart order pane page so that admin and customer can view the tracking number, but it is not showing anything. When i enter tracking number which is other function of this module, admin comments shows 'tracking number 1Z0609610 added by admin'

thank you for your help. :-)

function simple_package_tracking_order_pane_tracking_numbers($op, $order) {switch ($op) {
case 'view':
case 'customer':
  $rows = array();
  $result = db_query("SELECT tracking_id, tracking_number, tracking_carrier, tracking_url FROM {tracking_numbers} WHERE order_id = :order_id",array(':order_id' => $order->order_id));
 //while ($tracking = db_fetch_object($result)) {
    foreach ($result as $tracking) { 
    $row = array();
   $row[] = $tracking->tracking_carrier != NULL ? $tracking->tracking_carrier : t('Other');
   $row[] = l($tracking->tracking_number, $tracking->tracking_url, array('attributes' => array('target' => '_blank')));
    //if (user_access('fulfill orders')) {
      $row[] = l(t('Delete'), 'admin/store/orders/' . $order->order_id . '/tracking/' . $tracking->tracking_id . '/delete');
   // }
    $rows[] = $row;
  }
if (count($rows)) {
    $headers = array();
    $output = theme('table',array('header' => $header, 'rows' => $rows));
    return $output;
  }
break;  }}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.