getAttributeText() – Use Default Value Regardless of Store View

product-attributestore-view

How would I go about getting the Admin value for an attribute, regardless of the visitor's chosen store view?

I've tried:
$_product = $this->getProduct();
$_condition = $_product->getAttributeText('condition');
$_conditionDefault = $_product->setStoreID(0)->getAttributeText('condition');

However, setStoreId() does not work in this context.

Regardless of the language or store view that the visitor is currently viewing, I would like to be able to output the value for the Admin Store View and the value for the User's Current Store View.

The Condition attribute is a DropDown.

Best Answer

It typo mistake it should be setStoreId instead of setStoreID and use -getResource()

$_condition = $_product->getAttributeText('condition');
$prod= $_product->setStoreId(0);
$_coditionDefault =$_product->getResource()->getAttribute('condition')->getFrontend()->getValue($_product);
Related Topic