No replies
asadpakistani's picture
Joined: 06/09/2011
Juice: 7
Was this information Helpful?

Ubercart shows user id numbers on admin and user comment tables on order view pages. This works fine for a small store, but for a store with many employees they might want to be able to see the user name to coordinate amongst each other regarding issues on orders. This module is my humble approach towards fixing this issue. Any feedback is welcomed. In your info file add uc_order as a dependency for organization. Thank you.

function HOOK_tapir_table_alter(&$comments) {
$comments['#parameters'][0]) && ($comments['#parameters'][0] == 'op_order_comments_view_table' || $comments['#parameters'][0] == 'op_admin_comments_view_table')) {
$i = 0;
$comments['#rows'] as $row) {
is_numeric($row['user']['#value'])) {
$user = user_load($row['user']['#value']);
$comments['#rows'][$i]['user']['#value'] = l($user->name, 'user/'.$user->uid);