Skip to content

Instantly share code, notes, and snippets.

@TemporaryJam
Created September 3, 2014 13:39
Show Gist options
  • Save TemporaryJam/5cc8835ccc9a209cc3d8 to your computer and use it in GitHub Desktop.
Save TemporaryJam/5cc8835ccc9a209cc3d8 to your computer and use it in GitHub Desktop.
Various magento attribute notes
//Get attribute value, where 'technical_pdf' is attribute code
$_technical_pdf = $_product->getResource()->getAttribute('technical_pdf')->getFrontend()->getValue($_product);
//Get attribute frontend store label
$label = $_product->getResource()->getAttribute('attribute_code')->getStoreLabel();
//Get attribute value
$attribute_value = $_product->getAttributeText($attributeCode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment