Show Link in header for specific user group

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
adlorenz04
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Fri Jul 10, 2009 12:19 pm

Show Link in header for specific user group

Post by adlorenz04 » Mon Feb 15, 2010 9:16 am

I need to display a link in the header to a custom page for a specific user group. I have in that page the the code which works, but we are going to be adding about 170 separate logins that need to see this link. Is there a way of changing the following if statement from userid to usergroup?

#if($customer.UserID == 104 || $customer.UserID == 234 || $customer.UserID == 4)

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Show Link in header for specific user group

Post by mazhar » Mon Feb 15, 2010 9:31 am

First of all find out the group id for that specific group by looking at your database's ac_Groups table. For example in example below I am assuming that special group id is 10, you will place your group id in place of 10.

Code: Select all

#if($customer.IsInGroup(10))
<a href="#" target="_blank" >Now Available</a>
#else
Coming Soon
#end

adlorenz04
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Fri Jul 10, 2009 12:19 pm

Re: Show Link in header for specific user group

Post by adlorenz04 » Mon Feb 15, 2010 9:43 am

Thanks for your quick response! Is there a place where these class properties/functions are listed and explained?

Thanks,
Alex

Post Reply