Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 17th, 2013  |  syntax: PHP  |  size: 0.42 KB  |  views: 86  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. class EM_Galabrandstoresettings_Model_System_Config_Source_Attribute
  3. {
  4.  
  5.     public function toOptionArray()
  6.     {
  7.                 $attributes = Mage::getSingleton('catalogsearch/advanced')->getAttributes();
  8.                 $result = array();
  9.                 foreach($attributes as $attribute){
  10.                         $result[] = array(
  11.                                 'value' =>      $attribute->getAttributeCode(),
  12.                                 'label' =>      $attribute->getStoreLabel()
  13.                         );
  14.                 }
  15.                 return $result;
  16.     }
  17. }
  18. ?>