I have spend hours trying to figure out but failed. I need to extract a label and value for ‘manufacturer’ attribute in Magento. BUT I need to get the description which is in admin field – not the one which is store specific.
I have found many methods how to get store-specific, also I could extract all of the options for the attribute, but couldn’t get just a combination of current article from product page + admin value + admin label (no matter from which store I am accessing it).
Would anyone be able to help on that?
This gives an array of all values+labels, but not for a concrete article:
<pre><code>
$attribute = $_product->getResource()->getAttribute('manufacturer');
foreach ( $attribute->getSource()->getAllOptions(true, true) as $option){
$attributeArray[$option['value']] = $option['label'];
}
</code></pre>
Just get the value of the product manufacturer and get the label from your array of options like this: