Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
getAttributeSetName
 
Charles
Member
 
Avatar
Total Posts:  47
Joined:  2008-03-28
 

Hi,

I’d like to get the name of the Attribute Set that is related to a product.
In fact, I need it whenever a producta are displayed as a list and whenever a product is displayed as such.

Thanks,

Charles

 
Magento Community Magento Community
Magento Community
Magento Community
 
Charles
Member
 
Avatar
Total Posts:  47
Joined:  2008-03-28
 

BTW: I found out that there is a getAttributeSetId() method on the product class that is working fine.
$_product->getAttributeSetId()
Now, given the Id how would I get the Attribute Set Name ???

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo?
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2008-04-21
 

Charles,

Been searching for this and found a solution. The below returns the attribute set object so that you can call its name with getAttributeSetName();

Hope it helps. I know it has been a while.

<?php $attribute_set Mage::getModel('eav/entity_attribute_set')->load$_product->getAttributeSetId() ); 
echo 
$attributeset_name $attribute_set->getAttributeSetName();
?>

 Signature 

- Magento ver. 1.1.6

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53214 users|776 users currently online|107258 forum posts