Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public function getProductAttributeAdminValue(Mage_Catalog_Model_Product $_product, $attributeCode)
  2. {
  3. $resModel = Mage::getResourceModel('catalog/product');
  4.  
  5. $optionId = $resModel->getAttributeRawValue($_product->getId(), $attributeCode, 0);
  6.  
  7. $_product->setData($attributeCode, $optionId);
  8.  
  9. return $resModel->getAttribute($attributeCode)->setStoreId(0)->getFrontend()->getValue($_product);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement