- Posts: 7
- Thank you received: 0
Need little help in backend customization
14 years 3 weeks ago #64480
by vvujke
Need little help in backend customization was created by vvujke
Hi all,
I need little help in backend. What I would like to add/change is:
Tnx
I need little help in backend. What I would like to add/change is:
- On Customer page to add column that displays user groups after username column
- On Order page to add column that displays user groups after Customer column
Tnx
Please Log in or Create an account to join the conversation.
14 years 3 weeks ago #64584
by nicolas
Replied by nicolas on topic Re: Need little help in backend customization
Hi,
You can edit these layouts for your back end template via the menu Display->Views. It's the file "form" of the views "user" and "order".
You will have to get the order user id for the order view :
$id = $this->order->order_user_id;
and for the user view:
$id = $this->user->user_id;
before using the $id in some joomla code to get the group of the user.
Here is a thread about that:
forum.joomla.org/viewtopic.php?t=530721
Something like that might do the trick:
jimport( 'joomla.user.helper' );
$groups = JUserHelper::getUserGroups($id);
echo reset($groups);
You can edit these layouts for your back end template via the menu Display->Views. It's the file "form" of the views "user" and "order".
You will have to get the order user id for the order view :
$id = $this->order->order_user_id;
and for the user view:
$id = $this->user->user_id;
before using the $id in some joomla code to get the group of the user.
Here is a thread about that:
forum.joomla.org/viewtopic.php?t=530721
Something like that might do the trick:
jimport( 'joomla.user.helper' );
$groups = JUserHelper::getUserGroups($id);
echo reset($groups);
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds