Magentoは、特定の属性ラベルまたは特定の属性IDによって属性値をどのように見つけることができますか?
                  これは、[ここ](magento.stackexchange.com/a/8396)で確認された別のSO質問で答えられていると思います
                
                
                  
                    —
                    sbditto85 
                    
                  
                
              Magentoは、特定の属性ラベルまたは特定の属性IDによって属性値をどのように見つけることができますか?
回答:
$productModel = Mage::getModel('catalog/product');
$str_attr_label = "color";  //or "size", etc...
$int_attr_id = 8; // or any given id.
$int_attr_value = 21; // or any given attribute value id.
// Chose either
if ($byLabel){
    $attr = $productModel->getResource()->getAttribute($str_attr_label);
}
if ($byId){
    $attr = Mage::getModel('catalog/resource_eav_attribute')->load($int_attr_id);
}
if ($attr->usesSource()) {
    echo $color_label = $attr->getSource()->getOptionText($int_attr_value);
}       簡単に言えば、getAttributeTextメソッドを使用します。
$product->getAttributeText('brand')誰かがこのページを見つけて、製品属性だけでなく、あらゆる種類の属性を検索するいくつかの低レベルの方法が必要な場合は、「特殊」と呼ばれるすべてのオプションをリストして、私が作成したランダム属性を検索する例を次に示します。配列。
$attr = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter('specialty')->getData()[0];
$attributeModel = Mage::getModel('eav/entity_attribute')->load($attr['attribute_id']);
$src =  $attributeModel->getSource()->getAllOptions();