Skip to content

Instantly share code, notes, and snippets.

@davidalexander
Created December 3, 2013 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save davidalexander/7772193 to your computer and use it in GitHub Desktop.
Save davidalexander/7772193 to your computer and use it in GitHub Desktop.
Magento: Efficiently get a single product attribute from product id
<?php
$attribute_value = Mage::getResourceSingleton('catalog/product')->getAttributeRawValue($productId, 'attribute_code', Mage::app()->getStore());
echo $attribute_value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment