Created
September 14, 2011 16:49
-
-
Save rgranadino/1217074 to your computer and use it in GitHub Desktop.
Load Attribute With Store Frontend Label
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Collection */ | |
//note for 1.6 collection class is Mage_Catalog_Model_Resource_Product_Attribute_Collection | |
$collection = Mage::getResourceModel('catalog/product_attribute_collection') | |
->setItemObjectClass('catalog/resource_eav_attribute') | |
->setCodeFilter(ATTRIBUTE_CODE) | |
->addStoreLabel(Mage::app()->getStore()->getId()) | |
->load(); | |
/* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ | |
$attribute = $collection->getFirstItem(); | |
$attribute->getStoreLabel(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment