Skip to content

Instantly share code, notes, and snippets.

@rodde177
Created July 20, 2015 08:30
Show Gist options
  • Select an option

  • Save rodde177/e0e73ff64247e711788c to your computer and use it in GitHub Desktop.

Select an option

Save rodde177/e0e73ff64247e711788c to your computer and use it in GitHub Desktop.
$code = 'nwtcdon_expose_status';
$attributeId = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter($code)->getFirstItem()->getAttributeId();
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
if ($attribute->usesSource()) {
$items = $attribute->getSource()->getAllOptions(false,true);
}
foreach($items as $option) {
if($option['label']=='watchable') {
var_dump($option);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment