php - magento - use admin attribute -


who can me? ik have magento 1.6.2.

and extension uses code layered navigation:

public function getallfilterableoptionsashash()     {         if (is_null($this->_options))         {             $hash = array();             $attributes = mage::getmodel('catalog/layer')->getfilterableattributes();             foreach ($attributes $a){                 $code        = $a->getattributecode();                 $hash[$code] = array();                  foreach ($a->getsource()->getalloptions() $o){                     if ($o['value']){ // skip first empty                         $hash[$code][$this->createkey($o['label'])] = $o['value'];                     }                 }             }             $this->_options = $hash;         }          return $this->_options;     } 

this code generates url in layered navigation. code use translated labels ... blauw in dutch en blue in english ...

now use adminlabel ...

i know part should edited:

foreach ($a->getsource()->getalloptions() $o){                         if ($o['value']){ // skip first empty                             $hash[$code][$this->createkey($o['label'])] = $o['value']; 

i tried adminlabel ... doesn't work. can me this?

hmm if can edit code there, try do:

foreach ($a->getsource()->getalloptions(true, true /*get default admin values*/) $o) { 

Comments