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 | |
//Possible color value | |
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color'); //"color" is the attribute_code | |
$allOptions = $attribute->getSource()->getAllOptions(true, true); | |
foreach ($allOptions as $instance) { | |
$id = $instance['value']; //id of the option | |
$value = $instance['label']; //Label of the option | |
} | |
?> |
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
filepath: app/etc/modules/ | |
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<My_Module> | |
<active>true</active> | |
<codePool>local</codePool> | |
</My_Module> | |
</modules> | |
</config> |