getAllOptions(); if(is_array($value)) { foreach($value as $key){ $ret[] = @$options[$key]; } } return implode(",", $ret); } public function getAllOptions($withEmpty = true, $defaultValues = false) { $options = array(array('value' => '', 'label' => '', 'style' => '')); $_categories = $this->getConfig()->getAllCategories(); foreach ($_categories as $id => $categ) { if (isset($categ['name']) && isset($categ['level'])) { if ($categ['level'] < 1) $categ['level'] = 1; $options[] = array( 'value' => $id, 'label' => $categ['name'], 'style' => 'padding-left:' . (($categ['level'] - 1) * 7) . 'px;', ); } } return $options; } public function toOptionArray() { return $this->getAllOptions(); } public function getConfig() { return Mage::getSingleton('googlebasefeedgenerator/config'); } }