eschmidt Posted April 19, 2010 Share Posted April 19, 2010 I am looking for a way to detect what customer group a user belongs to in order to show them a link to their products. I would like a link to show up on the my-account.tpl page so when a user registers with our store, they see a link to their products. We have two different customer groups for our store and products are only visible once a user has registered to a group. So it would be something like if customer is in group A, they get link A. If customer is in group B they get link B. Is there a way to do this in the .tpl file? Or do I need to create a custom query to the database? Link to comment Share on other sites More sharing options...
yagooar Posted January 24, 2011 Share Posted January 24, 2011 The Customer.php class has a method called isMemberOfGroup($id_group), where $id_group is the id number of the group. Return value is a boolean so you can check whether a user is or is not inside of a specific group. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now