Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Custom Content for Customer Groups
 
Jaxbulls
Jr. Member
 
Total Posts:  17
Joined:  2007-08-31
 

I figured out how to customize my catalog pages depending on whether or not the user was logged in with this piece of code:

$this->helper('customer')->isLoggedIn()

Now I am trying to customize my pages according to the Customer Group that the person belongs to.  What is the code for that?  I just need the little one-line statement like I listed above to help me.

If someone does know the answer, how did you find it?  I looked through the new PHPDocs and I can’t even find my code from above in there so I am really unsure when the PHPDocs would be useful to me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

$group Mage::getSingleton('customer/session')->getCustomerGroupId();
 
Magento Community Magento Community
Magento Community
Magento Community
 
Jaxbulls
Jr. Member
 
Total Posts:  17
Joined:  2007-08-31
 

Thanks, that’s exactly what I needed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sosuke
Jr. Member
 
Total Posts:  24
Joined:  2008-06-12
 

i am not as familiar, as the original poster, with PHP. how could i use this to allow only certain customer groups to view certain categories of products. thank you for your time

 
Magento Community Magento Community
Magento Community
Magento Community
 
v2uk
Member
 
Total Posts:  64
Joined:  2008-03-23
 

bump smile

Any update on Sosuke’s question?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mpernkopf
Jr. Member
 
Total Posts:  21
Joined:  2008-07-16
 
sosuke - 13 June 2008 01:32 PM

i am not as familiar, as the original poster, with PHP. how could i use this to allow only certain customer groups to view certain categories of products. thank you for your time

Hy,

the Magento roadmap says, that there will come a functionality like this in next stable version

-> “Limited catalog access per user group”

Z

 
Magento Community Magento Community
Magento Community
Magento Community
 
v2uk
Member
 
Total Posts:  64
Joined:  2008-03-23
 

It will be a fair few months until this is in, I have a client at the moment who requires some restrictions right now.

So my choice is to either use something else, or find a way of doing this thats harder, then move the restrictions over to the proper way of doing it once it comes into play.

I’ve compiled as much useful info as possible on how to do this, there are still some gray area’s i’m not too sure on.

But if anyone has done this, can you take a look at http://www.magentocommerce.com/boards/viewthread/12814/ and post your thoughts if thats a good way / bad way or if there is a better way of doing it?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top