In Magento 1.x I could show the Admin value of an Attribute like this:


But it doesn't work in Magento 2. How can I show the Admin value of a dropdown list in Magento 2?

3 Answers 3


Easy way to do this (maybe not the cleanest):


Create object and load the product using id.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_product = $objectManager->get('Magento\Catalog\Mode\Product')->load($product_id);

Get the value using option id.

$optionId = 10;
$attr = $_product->getResource()->getAttribute('color');
if ($attr->usesSource()) {
   $optionText = $attr->getSource()->getOptionText($optionId);
  • Thank you, how do I get the ID number and how do I output the value? Sep 27, 2016 at 6:56
  • option ID can be fetched using inspect element Sep 28, 2016 at 11:23

To get the admin value of an attribute, try this :

$attribute = $product->getResource()->getAttribute('YOUR_ATTRIBUTE_NAME');
$adminValue = $attribute
              ->setStoreId(0) // Admin store ID

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.