Skip to content

Instantly share code, notes, and snippets.

@anderskristo
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anderskristo/616a741bd60176e7e6be to your computer and use it in GitHub Desktop.
Save anderskristo/616a741bd60176e7e6be to your computer and use it in GitHub Desktop.
Magento get attribute value
<?php
$productModel = Mage::getModel('catalog/product');
$int_attr_id = 1337; // Get attr by ID
$attr = Mage::getModel('catalog/resource_eav_attribute')->load($int_attr_id);
$attributeValue = $_product->getResource()->getAttribute($attr->getAttributeCode())->getFrontend()->getValue($_product);
var_dump($attributeValue);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment