Created
June 10, 2014 20:05
-
-
Save reidblomquist/8daada8044e8adb9491e to your computer and use it in GitHub Desktop.
Pull a Magento attribute's available options (in this case 'style_tag')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Ryaan is totes a newb */ | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
require_once('../magento/app/Mage.php'); | |
Mage::app(); | |
$attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'style_tag'); | |
if ($attribute->usesSource()) { | |
$options = $attribute->getSource()->getAllOptions(false); | |
print_r($options); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment